A UN panel examining Julian Assange's alleged rape case has found his self-imposed confinement in the Ecuadorian embassy in London amounts to illegal detention, the Swedish foreign ministry said Thursday.
The WikiLeaks founder, who has been holed up at the embassy since June 2012 to avoid arrest, said he expects the British police to call off their attempts to detain him if the panel rules in his favour when it publishes its report on Friday.
But Sweden's prosecution authority said the ruling had no impact on its investigation into a 2010 rape allegation against him, and Britain said it would have to arrest him as long as a European warrant for his arrest remained in vigour.
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 Swedish foreign ministry said the government had received a copy of the panel's conclusions.
"We can only note that the working panel has come to another conclusion than Swedish judicial authorities," a ministry spokeswoman told AFP.
Rulings by the UN group are not legally binding, although the Justice for Assange support group claimed its rulings have 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.
Samuelsson said he expected Swedish prosecutor Marianne Ny to ask a court to withdraw the arrest warrant.
"Marianne Ny would have to have my client released immediately," he said.
But the Swedish prosecution authority said Thursday the panel's ruling "has no formal significance for the ongoing investigation under Swedish law."
Prosecutors are keen to make headway in the case that has been deadlocked for nearly five years by questioning Assange. The Australian has denied the allegations.
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.
"Should I prevail and the state parties be found to have acted unlawfully, I expect the immediate return of my passport and the termination of further attempts to arrest me," Assange said in a statement on Thursday prior to the Swedish confirmation of the panel's ruling.
The 44-year-old Australian said that if the UN group were to rule against him, "I shall exit the embassy at noon on Friday to accept arrest by British police as there is no meaningful prospect of further appeal."
The British government said it was under an obligation to arrest him in both eventualities.
"An allegation of rape is still outstanding and a European arrest warrant in place, so the UK continues to have a legal obligation to extradite Mr Assange to Sweden," a government spokesman said.
"We have been consistently clear that Mr Assange has never been arbitrarily detained by the UK but is, in fact, voluntarily avoiding lawful arrest by choosing to remain in the Ecuadorian embassy."
"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.