Update: 4:50 p.m: The British foreign office has said that UK has a legal obligation to extradite Assange to Sweden as the allegation of rape is still outstanding against him, according to Reuters.
The British government has said it will be obliged to arrest Assange if he leaves the Ecuadorian embassy in London.
Update: 3:22 p.m.: A United Nations panel ruled in the favour of WikiLeaks founder Julian Assange, stating that he has been "arbitrarily detained", BBC reports.
Earlier, a BBC journalist said in a tweet, the "UN legal panel ruling in favour of Assange means he's safe to safe (sic) he'll surrender to the police if it goes against him."
The "UN legal panel's ruling on Assange is not legally binding," she said in another tweet.
WikiLeaks founder Julian Assange will surrender to the UK police on Friday if the United Nations rules that his detention in Sweden is legal, he said in a statement posted on the Wikileaks' Twitter account on Thursday.
The 44-year-old Australian national is facing detention in Sweden on the allegations of rape in 2010. Assange has denied the allegations and claimed that if he is extradited to Sweden, he would be transported to the United States, where he fears he would face trial over WikiLeaks' publication of US' classified documents, Reuters reported.
To avoid extradition to Sweden, Assange has been living in the Ecuadorian embassy in London since 2012, after the Ecuador government granted him political asylum.
"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.
He has demanded that his passport be returned if the UN ruling is in his favour. "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," he added.
Assange had filed a request for relief with the UN Working Group on Arbitrary Detention, arguing that his stay at the London embassy constituted arbitrary detention. He contested that he was deprived of fundamental liberties, including no access to sunlight or fresh air, inadequate medical facilities, as well as legal and procedural insecurity, during his stay at the embassy.
The UN will reportedly announce the outcome of its investigation on Friday afternoon.
Sexual assault allegations
Sweden issued extradition warrant against Assange to investigate a series of sexual assault allegations that were dropped by the Swedish prosecutors in August last year. However, they want to question him in connection with an outstanding rape allegation. Assange faces rape allegations by two women in Stockholm, The Guardian reports.