The founder of whistle-blowing website 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 faces claims he sexually assaulted two women this year.
He denies the allegations, 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."
In his first appearance at court last week, Mr Assange was refused bail on the grounds he could flee - despite the offer of sureties from figures including film director Ken Loach.
Lawyer Gemma Lindfield, representing the Swedish authorities, argued on Tuesday that the court had "already found that Mr Assange is a flight risk" and "nothing has changed since last week to allay the court's fears in this regard".
But District Judge Howard Riddle disagreed, saying that questions about Mr Assange's place of residence and the circumstances of his arrival in the UK had both now been cleared up.
Following the bail decision, human rights activist Bianca Jagger said: "I was very pleased with what happened and I am glad that due process has taken place. I trust the British legal system and I hope justice will be done."
But she expressed concern that the case had been "politicised".
Before the appeal against release was announced, Mr Loach said such a move by the Swedish authorities would "show there is some vindictiveness that goes beyond this particular case".
He added: "It would show there is some political element to the case, as clearly he is entitled to be given bail."
Author Yvonne Ridley said: "It is a victory for common sense. If he had been refused bail, it would have meant the court had become a political arena."
Mr Assange is accused of having unprotected sex with a woman, identified only as Miss A, when she insisted he use a condom.
The Australian is also accused of having unprotected sex with another woman, Miss W, while she was asleep.
The extradition case is due to return to the magistrates' court on 11 January.
Earlier on Tuesday, Mr Assange's mother told Australian television station Channel 7 that she had spoken to her son in prison.
"I told him how people all over the world, in all sorts of countries, were standing up with placards and screaming out for his freedom and justice, and he was very heartened by that," Christine Assange said.
"As a mother, I'm asking the world to stand up for my brave son."
Mrs Assange also read a statement from him, which she had copied down when he spoke to her from Wandsworth Prison. In it, he defended the actions of Wikileaks, adding: "My convictions are unfaltering."
Mr Stephens said his client had not been given any of his post - including letters relating to legal letters - since being remanded in custody.
"He has absolutely no access to any electronic equipment, no access to the outside world, no access to outside media," he said.
The lawyer said the only correspondence his client had received was a note telling him that a copy of Time magazine sent to him had been destroyed because the cover bore his photograph.
In recent weeks, Wikileaks has published a series of US diplomatic cables revealing secret information on topics such as terrorism and international relations.
The latest release, published by the Guardian newspaper, shows that the US had concerns after the 7 July bombings that the UK was not doing enough to tackle home-grown extremists.
Another cable claims British police helped "develop" evidence against Madeleine McCann's parents after she went missing.