A demonstrator holds a banner outside the Ecuadorean Embassy in London, where Wikileaks founder Julian Assange is staying, Thursday, Feb. 4, 2016. WikiLeaks founder Julian Assange says he will accept arrest by British police if a U.N. working group investigating his claims decides that the three years he has spent inside the Ecuadorean Embassy doesn't amount to illegal detention. (AP Photo/Kirsty Wigglesworth)

GENEVA (AP) — A United Nations human rights panel has sided with WikiLeaks founder Julian Assange in his long-running battle with Swedish and British authorities, saying he should be freed immediately and compensated for the years he has lost.

The U.N. Working Group on Arbitrary Detention, which falls under the offices of the U.N. human rights chief, said Assange has been “arbitrarily detained” by Britain and Sweden since December 2010, when he was first sought for questioning on allegations of sexual misconduct.

The panel’s recommendation was immediately rejected by Swedish and British officials who said Assange’s legal situation is unchanged. He remains in the Embassy of Ecuador in London, where he sought refuge more than three years ago.

The panel’s finding has no legal force, British and Swedish officials maintain, but it represents a public relations victory for Assange, who argues that the allegations against him are part of a plot to send him to the United States to face more possible charges related to WikiLeaks’ release of classified documents.

The panel’s decision was not unanimous: Vladimir Tochilovsky, a Ukrainian member, disagreed with the other three voting members because he did not believe the group had a mandate to investigate the case because he did not believe Assange had been detained. The fifth member of the panel recused herself because she is Australian, as is Assange.

It is not clear if U.S. judicial officials are seeking Assange’s arrest on U.S. charges. No charges have been filed against Assange in Sweden, but Swedish prosecutors want to question him over allegations of rape stemming from a working visit he made to the country in 2010 when WikiLeaks was attracting international attention for its secret-spilling.

Assange has consistently denied the allegations but declined to return to Sweden to meet with prosecutors and eventually sought refuge in the Ecuadorean embassy in London, where he has lived since June 2012.

The panel criticized Sweden’s approach, noting that Assange was never formally charged in Sweden — only placed under preliminary investigation.

“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 panel chairman Seong-Phil Hong in a statement.

Citing the International Covenant on Civil and Political Rights that has 168 state parties including both Sweden and Britain, the panel said “the adequate remedy would be to ensure the right of free movement of Mr. Assange and accord him an enforceable right to compensation.”

British officials argue that Assange is free to leave the Ecuadorean Embassy at any time — although he would face arrest from British police because of a European Arrest Warrant issued at Sweden’s behest. He is also sought by Britain for jumping bail.

The panel’s decision, which was given privately to the governments before it was released to the public, seems to have stunned officials in Sweden and Britain who maintain proper procedures have been followed at all times.

Karin Rosander, spokeswoman for the Swedish Prosecution Authority, said that under Swedish law the panel’s conclusion will have no “formal impact.”

The panel criticized a “disproportionate” reaction by Swedish prosecutors in issuing a European arrest warrant rather than seeking to question Assange using bilateral agreements with Britain, and insisted that the Swedish prosecutor refused to consider other ways of interviewing him compatible with his right to asylum — which it said was not properly respected.

Britain’s Foreign Office said in a statement it would formally contest the panel’s opinion.

“This changes nothing. We completely reject any claim that Julian Assange is a victim of arbitrary detention,” the Foreign Office said in a statement. “Julian Assange has never been arbitrarily detained by the U.K. The opinion of the U.N. Working Group ignores the facts and the well-recognized protections of the British legal system.”

It countered that Assange was “voluntarily avoiding lawful arrest by choosing to remain in the Ecuadorean embassy.”

The case has also been complicated by uncertainty surrounding Assange’s legal status in the United States. The U.S. government has not revealed whether he has been indicted — grand jury proceedings are secret there — but has indicated that sensitive investigations into Assange and WikiLeaks have been made.

The working group said Assange could face “refoulement” to the United States — being handed over to a country where he could face violence or prison. The U.N. upholds the principle of non-refoulement prohibiting that practice.