The founder of Wikileaks, Julian Assange, has been granted bail in London on conditions including cash guarantees of £240,000.
But he will remain in prison pending an appeal against the bail decision lodged by Swedish prosecutors.
Mr Assange is fighting extradition to Sweden, where he is accused of sexually assaulting two women earlier this year.
He denies the charges, which he says are politically motivated and designed to discredit him.
His lawyer Mark Stephens said the case was turning into a "show trial".
A large crowd including demonstrators, reporters and a number of Mr Assange's high-profile supporters gathered outside City of Westminster Magistrates' Court for the bail hearing on Tuesday.
Journalists inside the court were given permission by the judge to report on proceedings live via micro-blogging website Twitter.
Mr Assange was granted bail on condition he provides a security of £200,000 to the court, with a further £40,000 guaranteed in two sureties of £20,000 each.
Mr Stephens said almost half the bail money had been raised and he was confident they would have all the cash before the appeal hearing.
Mr Assange must also surrender his passport, obey a curfew at an address in Suffolk, wear an electronic tag and report to a local police station every evening.
Mr Stephens said the High Court would hear the challenge to the bail decision within the next 48 hours.
Speaking outside court, he said: "The Swedes won't abide by the umpire's decision. They want to put Mr Assange through yet more trouble, more expense, more hurdles.
"They clearly will not spare any expense but to keep Mr Assange in jail."