Julian Assange
Wikileaks founder Julian Assange has been holed up at the Ecuadorian embassy in London for more than three years Reuters

A UN panel considering the allegedly unlawful detention of WikiLeaks founder Julian Assange has ruled in his favour, sources told the BBC. He took refuge in the Ecuadorian Embassy in London in 2012, to avoid extradition to Sweden where he was wanted for questioning over sexual assault claims, which he denies.

Police stood guard outside the embassy to arrest Assange if he left and in 2014, he complained to the UN that he was being "arbitrarily detained". He argues he has been denied access to basic rights, such as sunlight, fresh air and adequate medical facilities. In a tweet, WikiLeaks said "we are waiting for official confirmation" of the ruling.

The UN's Working Group on Arbitrary Detention (WGAD) is to announce the findings of its investigation on 5 February. In a statement, Assange said if the panel does not rule in his favour he will leave the embassy and accept arrest.

"Should the UN announce tomorrow that I have lost my case against the United Kingdom and Sweden, I shall exit the embassy at noon on Friday to accept arrest by British police as there is no meaningful prospect of further appeal," Assange said in the statement posted on the WikiLeaks Twitter account.

"However, 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."

The panel's legal experts rule on whether the detention is legal, though its decisions are non-binding on Swedish and UK authorities. The UK Foreign Office said it still had a duty to extradite Assange, while the Metropolitan Police said in a statement they will arrest the WikiLeaks founder as a warrant remains in place.