WikiLeaks founder Julian Assange has found a surprising ally — a little known United Nations panel that has decided he has been unfairly detained in Britain while seeking to avoid extradition to Sweden to answer allegations of sexual misconduct.

But it's not clear if the findings of the five members of the UN Working Group on Arbitrary Detention, to be officially announced in Geneva Friday, will lead to a change in Assange's legal status. The sun-starved computer hacker has been holed up inside the Ecuadorean Embassy in London for more than three years, and as things stand now he still faces arrest if he steps outside.

Swedish officials said Thursday the UN panel report concludes Assange has been a victim of an "arbitrary detention," apparently because he has been unable to leave the embassy without fear of being immediately taken into custody by British police armed with a European arrest warrant.

Britain said it had never arbitrarily detained Assange and that the Australian had voluntarily avoided arrest by jumping bail to flee to the embassy.

But the United Nations Working Group on Arbitrary Detention ruled in Assange's favour, Sweden said.

"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, 44, said in a short statement posted on Twitter. He had said that if he lost the appeal then he would leave his cramped quarters at the embassy in the Knightsbridge area of London, though Britain said he would be arrested and extradited to Sweden as soon as he stepped outside.

Britain Wikileaks Assange

British Fashion designer Vivienne Westwood speaks to the media as she arrives outside the Ecuadorean Embassy in London, where Wikileaks founder Julian Assange is staying, Thursday, Feb. 4, 2016. Westwood is one of Assange's vocal supporters. (Kirsty Wigglesworth/Associated Press)

Rape allegations in Sweden

Swedish prosecutors want to question Assange over allegations of rape stemming from a working visit he made to the Nordic country in 2010 when WikiLeaks was attracting international attention for its secret-spilling ways. They haven't charged him with any crime so far, but Assange has refused to return to answer questions — saying he fears the whole thing is an elaborate setup designed to send him to the United States to face espionage charges there. British police also accuse Assange of jumping bail.

The unexpected panel finding in Assange's favour confounded some experts who have followed the case. Ove Bring, a professor of international law at Stockholm University, said he was very surprised.

"First of all I don't think it's a detention. Secondly, it's not arbitrary," Bring said.

He said Assange's situation "is definitely not a case of unlawful detention" since the WikiLeaks-founder has chosen to stay at the embassy.

He could at any time have agreed to be questioned in Sweden, after which the prosecutor most likely would have been forced to abandon the case due to a lack of evidence, Bring said.

Julian Assange

WikiLeaks founder Julian Assange, right, sits next to Ecuadorian Foreign Minister Ricardo Patino during an August 2014 press conference in the Ecuadorean Embassy in London. (John Stillwell/Getty Images)

Assange, 44, has demanded via Twitter that he be given back his passport — held by British authorities — in light of the UN panel's conclusion.

The panel's finding, based on a claim filed by Assange and his lawyers more than a year ago, could increase pressure on prosecutors to drop proceedings against Assange.

The panel consists of a Korean law professor, a Mexican human rights expert, a law professor from Benin, an Australian judicial expert, and a specialist in international criminal justice from Ukraine.

Per E. Samuelsson, a Swedish lawyer for Assange, told The Associated Press that prosecutors should "revoke" the arrest warrant and "set him free" in light of the panel's conclusion.

Samuelsson said: "If it happens that way, it will be a victory."

Assange video

Assange is shown on a big screen taking part from London via teleconference in a panel taking place in Buenos Aires, Argentina in September 2015. (Juan Mabromata/AFP/Getty Images)

Unclear if U.S. will indict Assange

So far, there are no indications that prosecutors are ready to end an inquiry into rape allegations. Sweden's prosecution authority noted Thursday that the statement from the working group has no formal impact on the ongoing investigation, according to Swedish law.

Sweden and Britain may also choose to appeal the panel's decision, a process that could take months.

Two women accused Assange of the sexual misconduct in 2010, leading Swedish police to open an investigation and seek him for questioning. Last year, prosecutors dropped investigations of less serious allegations into alleged sexual assault as their statute of limitations expired, but were not willing to do so with the more serious rape allegation, which centres around a woman's claim that Assange had sex with her when she was asleep, which can be considered rape in Sweden.

Assange has consistently denied the allegations but declined to return to Sweden to meet with prosecutors and eventually sought refuge in the Ecuadorean embassy near Harrod's department store in a posh neighbourhood of central London. That has been his home since June, 2012.

Swedish prosecutors say they have attempted to question Assange at the embassy since March last year but have been unable to do so because Ecuadorean authorities haven't permitted it.

The seemingly-simple case has been greatly complicated by uncertainty surrounding Assange's legal status in the United States.

The U.S. government has not revealed whether he has been indicted — since grand jury proceedings are secret there — but has indicated that sensitive investigations into Assange and WikiLeaks have been made.

One of Assange's lawyers, Melinda Taylor, told The Associated Press Thursday he seeks guarantees from Sweden and Britain that he will not be sent to the United States. She said he may seek safe passage to Ecuador, which has given him political asylum.

Ecuadorean Foreign Minister Ricardo Patino has said Assange could immediately go to Ecuador if he's given safe conduct by Britain.

with files from Reuters