Wikileaks founder Julian Assange says he will accept arrest by British police if a U.N. working group on arbitrary detention decides that the three years he has spent holed up in the Ecuadorean Embassy does not amount to illegal detention.

Writing on Wikileaks' Twitter account Wednesday night, Assange said if the U.N. finds he has lost his case against the United Kingdom and Sweden then he will turn himself into police at noon on Friday.

"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," Assange added.

Assange took refuge in Ecuador's British embassy to avoid extradition to Sweden where two women have accused him of sexual assault.