The founder of whistle-blowing website Wikileaks, Julian Assange, has been granted conditional bail by a judge.
The 39-year-old was granted bail in London earlier this week but remained in jail after prosecutors objected.
The Australian is fighting extradition to Sweden over sex charges involving two women. He denies the allegations.
Mr Justice Ouseley granted conditional bail at the Royal Courts of Justice and supporters put up £240,000 in sureties. His release is expected on Thursday.
However, the BBC understands he may not be freed until Friday because those who provided the finances must complete paperwork at a police station.
Mr Assange's solicitor, Mark Stephens, said afterwards the bail appeal was part of a "continuing vendetta by the Swedes".
He said: "We have won costs today but they should be paid by Sweden not the hard-pressed Crown Prosecution Service (CPS)."
There has been dispute over who was motivated to appeal against Mr Assange's release, with Director of Public Prosecutions saying the CPS was merely acting as "agents" on behalf of the Swedish government. Nils Rekke, from the Swedish Prosecutor's Office, claimed it was "a purely British decision".
Mr Assange's mother, Christine, said she was "very, very happy" with the decision and thanked his supporters.
"I can't wait to see my son and to hold him close. I had faith that the British justice system would do the right thing and the judge would uphold the magistrates' decision, and that faith has been reaffirmed," she said.
Gemma Lindfield, representing the prosecution, had told the judge there was "a real risk" Mr Assange would abscond and pointed to his nomadic lifestyle.
She said he had "the means and ability" to go into hiding among Wikileaks' many supporters in this country and abroad.
But Mr Justice Ouseley pointed out Mr Assange had offered to meet the police in London when he heard the Swedish matter was still live and he said: "That is not the conduct of a person who is seeking to evade justice."
However, he did impose strict bail conditions including wearing an electronic tag, reporting to police every day and observing a curfew. Mr Assange also must stay at the Norfolk mansion of Wikileaks supporter Vaughan Smith.
Earlier, the judge made a ruling banning the use of Twitter to give a blow-by-blow account of Thursday's proceedings.
Mr Assange has received the backing of a number of high-profile supporters including human rights campaigners Jemima Khan and Bianca Jagger, and film director Ken Loach.
Wikileaks has published hundreds of sensitive American diplomatic cables, details of which have appeared in the Guardian in the UK and several other newspapers around the world.
He has been criticised in the US where former Republican vice-presidential candidate Sarah Palin has said he should be hunted down like the al-Qaeda leadership.
Mr Assange argues the allegations against him are politically motivated and designed to take attention away from the material appearing on Wikileaks.
One of his supporters, writer Tariq Ali, said: "I'm relieved. He should never have been denied bail in the first place."
He said Mr Assange had suffered from some "vindictive and punitive" decisions and he claimed: "The Swedes are acting on behalf of a bigger power."
Mr Assange is accused of having unprotected sex with a woman, identified only as Miss A, when she insisted he use a condom.
He is also accused of having unprotected sex with another woman, Miss W, while she was asleep.