Julian Assange, the founder of WikiLeaks, prepares to address the crowd at an antiwar demonstration in London, Oct. 8, 2011. oli scarff/getty images

UPDATE: 6:24 a.m. EST — British foreign office said Thursday that the United Kingdom has a legal obligation to extradite WikiLeaks founder Julian Assange to Sweden because sexual assault allegation is still outstanding against him.

“We will not pre-empt any opinions from the U.N. working group on arbitrary detention. We have been consistently clear that Assange has never been arbitrarily detained by the U.K. but is, in fact, voluntarily avoiding lawful arrest by choosing to remain in the Ecuadorian embassy. An allegation of rape is still outstanding and a European arrest warrant in place, so the U.K. continues to have a legal obligation to extradite Assange to Sweden,” the foreign office said, according to the Guardian.

UPDATE: 4:26 a.m. EST — The United Nations panel investigating the detention of WikiLeaks founder Julian Assange in the Ecuadorian embassy in London has ruled in his favor, BBC reported Thursday. The U.N. Working Group on Arbitrary Detention reportedly said that Assange has been "arbitrarily detained." However, there's no official announcement yet on the matter.

Meanwhile, British police said Thursday that they will arrest Assange if he leaves the embassy. "The warrant is still in place. If he leaves the embassy we will make every effort to arrest him," a spokesman for the British police said, according to Reuters.

The 44-year-old took refuge in the embassy to avoid extradition to Sweden.

Original story:

Julian Assange, the founder of WikiLeaks, said he will accept arrest by British police Friday if a United Nations panel investigating his case does not say that he is being illegally detained in the Ecuadorian embassy in London, the whistleblower said in a statement. Assange has been living in the embassy for over three years where he took refuge to avoid extradition to Sweden.

The U.N. Working Group on Arbitrary Detention (WGAD) has been investigating whether Assange was detained at the embassy unlawfully and it is set to announce a decision over the matter Friday.

Assange said, in a statement posted on WikiLeaks Twitter account, that if he lost the case against the United Kingdom and Sweden, he would "exit the embassy at noon on Friday (GMT) to accept arrest by British police, as there is no meaningful prospect of further appeal." However, he added that if the U.N. ruled in his favor he expected the "immediate return" of his passport "and the termination of further attempts to arrest me."

Assange sought refuge in the embassy in June 2012 after Swedish officials demanded his extradition for questioning over sexual assault allegations against him by two women. The 44-year-old has not been charged with any offense in the case, and has denied the allegations. He fears that Sweden would extradite him to the U.S. for leaking classified diplomatic cables in November 2010, one of the largest information leaks in America's history.

However, the U.N. is likely to rule in favor of the Australian national, the Sydney Morning Herald reported. The WGAD, which is made up of legal experts, has made previous rulings on whether imprisonment or detention is lawful, which have led to people being released.

According to his lawyer Melinda Taylor, Assange will not walk out of the embassy the moment the decision comes out, even if it is in his favor. "It is then a matter of calling on the U.K. and Sweden to apply their international obligations," Taylor told Fairfax Media, the Herald reported.

"We would obviously expect the United Kingdom and Sweden to comply ... and to implement immediately any measures required to ensure conformity with these obligations. He would have to be given the right to freedom of movement," Taylor added.