A United Nations human rights panel says WikiLeaks founder Julian Assange has been "arbitrarily detained" by Britain and Sweden since December 2010, in a ruling that has been outright rejected by both countries.
The UN Working Group on Arbitrary Detention said on Friday that Assange's "detention" should end and he should be entitled to compensation.
Swedish prosecutors want to question Assange over allegations of rape stemming from a working visit he made to the country in 2010 when WikiLeaks was attracting international attention for its trove of leaked documents.
Assange has consistently denied the allegations but declined to return to Sweden to meet prosecutors and eventually sought refuge in the Ecuadorean embassy in London, where he has lived since June 2012.
"The Working Group on Arbitrary Detention considers that the various forms of deprivation of liberty to which Julian Assange has been subjected constitute a form of arbitrary detention," said Seong-Phil Hong, who currently heads the UN's expert panel.
“The Working Group maintains that the arbitrary detention of Mr Assange should be brought to an end, that his physical integrity and freedom of movement be respected, and that he should be entitled to an enforceable right to compensation."
Both Sweden and the UK dismissed the ruling on Friday, issuing statements saying that Assange is free to leave the embassy whenever he wants.
"Swedish authorities have no control over his decision to stay there. Mr Assange is free to leave the embassy at any point," the Swedish government said.
The UK government said that Assange was avoiding "lawful arrest" by choosing to remain at the embassy and that the government had a legal obligation to extradite him to Sweden.
The finding in Assange's favour is not legally binding, but may represent a public relations victory for the 44-year-old Australian.
It could also increase pressure on Swedish prosecutors to drop their bid to question Assange about allegations of sexual misconduct, and on British officials to alter plans to arrest Assange for jumping bail.
Assange, in a press conference on Friday via a video link from the Ecuadorian embassy, said he should be able to walk free from the embassy.
"We have today a really significant victory that has brought a smile to my face," Assange said.
"I've been detained without charge in this country, the United Kingdom, for five and a half years ... I've had great difficulty seeing my family and my children," he said.
Geoffrey Robertson, QC, a former UN appeals judge and international lawyer, told Al Jazeera on Thursday that a UN ruling would be "binding in honour".
Assange has been in the embassy for more than three years. His organisation WikiLeaks was responsible for publishing millions of documents considered classified by the US government.