Mr. Assange has said repeatedly that he is innocent of any wrongdoing.

The High Court justice Duncan Ouseley on Thursday rejected the Swedish government’s request that bail be denied, but he imposed restrictive conditions on Mr. Assange. Justice Ouseley said Mr. Assange must wear an electronic tag, abide by a curfew and meet daily with the police.

He will also be restricted to a small area around the 10-bedroom mansion, Ellingham Hall, which is owned by Vaughan Smith, the wealthy founder of a journalists’ club in London. A previous ruling would have allowed Mr. Assange to roam the estate’s expansive grounds with, as Geoffrey Robertson, one of his lawyers, joked, “gamekeepers looking out for him.”

Mr. Assange’s passport was seized when he was arrested last week and it has not been returned.

Though he won his freedom, Mr. Assange’s growing myth  a reputation among supporters, at least, as the Robin Hood of secrets  did not act in his favor during the two-hour court hearing.

Gemma Lindfield, who was representing the Swedish government, urged the court to separate the contentions over the WikiLeaks releases from the sexual accusations. Ms. Lindfield argued that a series of well-known people who have stepped up to support Mr. Assange, including the film directors Ken Loach and Michael Moore and Jemima Khan, a socialite, “do not have a close relationship” with him. Their promises of bail money and other guarantees, she said, were made to support WikiLeaks and were not related to the Swedish accusations.

Justice Ouseley said that Mr. Assange’s supporters might see “absconding as a righteous and justifiable act” if it meant that the work of disclosing secret information could continue. In granting bail he stipulated that two of Mr. Assange’s closest WikiLeaks associates, Joseph Farrell and Sarah Harrison, were required to add financial guarantees to those from the prominent people who had vouched for Mr. Assange.