For the last three and half years, WikiLeaks founder Julian Assange has lived in the Ecuadorean Embassy in London to avoid arrest and extradition to Sweden to face sexual assault accusations.
A United Nations panel is expected to announce Friday that his time there amounts to "arbitrary detention" because he has been unable to exercise his right to political asylum, which Ecuador has offered him.
British authorities have said they have a legal obligation to arrest Assange if he steps out of the embassy.
The ruling by the Working Group on Arbitrary Detention, which is not legally binding, appears to be primarily a public relations triumph for Assange.
The decision was first reported Thursday by the BBC and later confirmed by Sweden's foreign minister.
Assange has been holed up in the embassy since 2012, when he claimed asylum after Sweden issued a warrant for his arrest based on testimony from two women there who say he sexually assaulted them. He has not been charged and denies the claims. Sweden has since dropped much of the case but still wants to question him about an alleged rape.
For Assange, the case has always been about more than the sexual assault allegations. He fears that Sweden or Britain would turn him over to the U.S. for prosecution on espionage charges stemming from WikiLeaks' massive release of classified documents in 2010.
As the news broke Thursday, his supporters expressed hope that the standoff could finally be brought to an end.
"For me, Julian Assange is somebody who has challenged power and actually been detained by power," his friend Vaughan Smith told reporters. "I'm really pleased that there is a potential resolution and I hope that the British and Swedish authorities will respond accordingly."
But neither Sweden nor Britain indicated any change in their positions on the case.
"The working group's view differs from that of the Swedish authorities," a spokeswoman for Sweden's Foreign Ministry said.
"We have been consistently clear that Mr. Assange has never been arbitrarily detained by the U.K. but is, in fact, voluntarily avoiding lawful arrest by choosing to remain in the Ecuadorean Embassy," a spokesman for the British Foreign Office said.
Britain's Metropolitan Police said in a statement that because a European arrest warrant was still in place and an allegation of rape was outstanding, it has a legal obligation to arrest Assange if he leaves the embassy.
The U.N. panel took up the case after the Australian-born Assange filed a complaint against Sweden and Britain in 2014.
He argued that being confined to the embassy was not his choice and that he was unable to get to Ecuador. He also claimed that being forced to live in roughly 320 square feet without sunlight or fresh air had taken a "significant toll" on his mental and physical health.
The panel has previously ruled against countries with poor human rights records, which could make Friday's ruling awkward if Britain and Sweden decide to ignore it.
The two governments were made aware of the decision in January. Assange released a statement Thursday on Twitter saying he would "accept arrest" by British police on Friday if the U.N. panel ruled against him.
But if the panel ruled in his favor, he wrote, he expected "the immediate return of my passport and the termination of further attempts to arrest me."
Assange's legal team has said it will hold a news conference in London on Friday after the official report has been published.