Wikileaks founder Julian Assange has said he will turn himself over to UK police on Friday if a UN panel rules he has not been unlawfully detained.

He took refuge in London's Ecuadorian embassy in 2012 to avoid extradition to Sweden over sexual assault claims.

In 2014 he complained to the UN that he was being "arbitrarily detained" as he could not leave without being arrested.

Mr Assange, who denies all the claims, said he will accept the ruling but hoped to walk free if it went his way.

The UK Foreign Office said Mr Assange had voluntarily avoided lawful detention, saying it still had an obligation to extradite him.

The UN's Working Group on Arbitrary Detention is due to announce the findings of its investigation into Mr Assange's case on Friday.

The panel of legal experts took evidence from the UK and Sweden. It has made previous rulings on whether imprisonment or detention is lawful although it does not have any formal influence over the British and Swedish authorities.