The UN Working Group on Arbitrary Detention, an independent panel of experts, ruled in a statement on Friday that the Australian former hacker had been “arbitrarily detained by the Governments of Sweden and the United Kingdom”.
The panel insisted Assange's detention “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.”
The Wikileaks founder, who has been holed up at the embassy since June 2012 to avoid arrest, insisted that the ruling was legally binding in international law, saying the UN was higher body than national law, at a press conference on Friday.
"The unlawfulness of my detention is now a matter of settled law," he said.
"I would like to say thank you, that I miss my family. That we have today a really significant victory that has brought a smile to my face and I hope many others as well."
Ecuador's Foreign Minister Ricardo Patino told a press conference that the ruling confirmed that Assange was a victim of "political persecution".
"It is time for both governments (Britain and Sweden) to correct their mistake, time for them to allow Julian Assange his freedom, time for them to end this arbitrary detention and furthermore compensate the damage done to this man," he said.
"We've said it from the beginning, but now we're not the only ones. This is obvious political persecution. That has been absolutely demonstrated."
However, Sweden's foreign ministry on Friday said that the panel had no right to "interfere", while Britain's Foreign Secretary Philip Hammond called the UN ruling "ridiculous".
Britain maintains that it has an obligation to arrest Assange as long as a European warrant for his arrest remained in force.
Meanwhile, Sweden's foreign ministry has sent a letter to the UN panel formally disagreeing with its decision.
"Mr Assange has chosen, of his own free will, to be in the Ecuadorian embassy," the legal head of the foreign ministry's legal division Anders Rönquist wrote, according to a Swedish translation published by TT newswire. "Mr Assange is free to leave the embassy at any time. Therefore he is not deprived of his liberty as a result of any decision made or action taken by the Swedish authorities."
Sweden's interior minister Anders Ygeman told news agency TT that the Swedish government had done what it could to try to resolve the deadlock.
"We have done what we could to make it possible for Swedish (prosecution) authorities to question him in the embassy, but that has not yet been possible. It's up to Ecuador and Assange now," he said.
Meanwhile Elizabeth Fritz, the lawyer for the woman who has accused Assange of rape, said that the UN ruling was offensive to her client.
"That a man who is wanted on an arrest warrant for rape should be awarded compensation for intentionally hiding from the judicial system for more than five years is offensive to my client and to the human rights of all victims of crime," she said in a statement.
The full text of the UN panel's report accused Sweden and the UK of a "substantial failure to exercise due diligence...with regard to the performance of the criminal administration".
"After more than five years of time lapse, [Assange] is still left even before the stage of preliminary investigation with no predictability as to whether and when a formal process of any judicial dealing would commence," it reads.
It concludes: "The working group is convinced that … the current situation of Mr Assange staying within the confines of the embassy of the Republic of Ecuador in London has become a state of an arbitrary deprivation of liberty."
However, the statement also revealed that of the five independent rights experts on the panel, one had excused herself on account of her Australian nationality, while another had disagreed with the decision, arguing that Mr Assange's situation "was not one of detention".
"It is very unusual that there is a decision not based on consensus," Christophe Peschoux, the working group's secretary, said at a briefing in Geneva.
Mark Klamberg, an associate law professor at Stockholm University and one of Sweden's foremost experts on international human rights law, told The Local that although he personally disagreed with the panel's opinion, as Assange had voluntarily taken refuge in the embassy, it was "tricky" for Sweden, as the country would usually aim to comply with UN panels.
"The opinion in itself is not binding, however it has made its opinion based on certain international treaties, and those treaties are binding,” he said. “Is it irrelevant? I wouldn't say so."
He predicted that Assange's legal team would use the findings to again challenge the arrest warrant against Assange in the Swedish courts.
“Part of the reasoning will be the findings of this panel, so the Swedish courts will have to evaluate what the legal consequences of this opinion are, if there are any,” he said.
He said that Ecuador might also cite the findings as a reason to cancel a deal with Sweden on the Swedish prosecutor interviewing Assange at the embassy.
“Is Ecuador going to change its mind now because of the findings of the panel? That could be interesting to see.”
Wikileaks filed a complaint against Sweden and Britain to the UN Working Group on Arbitrary Detention (UNWGAD) in September 2014, claiming his confinement in the embassy amounted to illegal detention.
The Justice for Assange support group maintains that the panel's rulings have historically influenced the release of prominent figures, including Myanmar's Aung San Suu Kyi and Washington Post journalist Jason Rezaian, who was held by Iran for 18 months.
Assange's Swedish lawyer Per Samuelsson told AFP that his client met the definition of someone being illegally detained, even though he himself chose to seek refuge in the embassy.
“The European Convention on Human Rights doesn't define detention as sitting in a cell, it sees it an infringement of one's freedom” if a person's movements are limited due to the risk of arrest. “The European Convention has a wider definition,” he said.
But the Swedish prosecution authority said on Thursday that the panel's ruling “has no formal significance for the ongoing investigation under Swedish law.”
Assange sought refuge in the embassy in June 2012 to avoid arrest and extradition to Sweden, amid fears he could eventually be extradited to the United States to be tried over the leak of hundreds of thousands of classified military and diplomatic documents by his anti-secrecy group Wikileaks.
“Hopefully, the British and Swedish authorities will allow him freedom,” Vaughan Smith, a friend and supporter of Assange, told AFP. “He has a miserable existence, so of course he wants to get out,” he said.
Ecuador has granted him asylum, but he has faced immediate arrest if he steps onto British soil and for years police have been posted around the clock outside its doors at a cost of millions of pounds.
In October last year, British police ended the 24-hour guard outside the embassy in west London but said they would strengthen a “covert plan” to prevent his departure.
Assange founded Wikileaks in 2006, and its activities – including the release of 500,000 secret military files on the wars in Afghanistan and Iraq and 250,000 diplomatic cables – have infuriated the United States.
The main source of the leaks, US Army soldier Chelsea Manning, was sentenced to 35 years in prison for breaches of the Espionage Act.
Wikileaks has said Sweden's handling of its founder's case has left a “black stain” on the country's human rights record.
In its submission to the UN panel it said “the only protection he has… is to stay in the confines of the embassy; the only way for Mr Assange to enjoy his right to asylum is to be in detention.
“This is not a legally acceptable choice,” it added, according to a file posted on the website justice4assange.com.