A British judge has upheld a U.K. arrest warrant for WikiLeaks founder Julian Assange, leaving his legal position unchanged after more than five years inside Ecuador's embassy in London.

Judge Emma Arbuthnot rejected a call from Assange's lawyers for the warrant to be revoked because he is no longer wanted for questioning in Sweden.

"I am not persuaded the warrant should be withdrawn," Arbuthnot told lawyers, journalists and Assange supporters gathered at London's Westminster Magistrates' Court.

Assange speaks to reporters from the balcony of the Embassy of Ecuador in London in May 2017. Last month, his lawyers argued in court that he has depression, a frozen shoulder and a bad tooth. (Jack Taylor/Getty Images)

Assange, 46, has been holed up in Ecuador's embassy in London since he took refuge there in June 2012 to avoid extradition to Sweden. At the time, Swedish prosecutors were investigating allegations of sexual assault and rape made by two women in 2010, accusations he denied.

Swedish prosecutors dropped the case last year, but Assange was still subject to a British arrest warrant for jumping bail in 2012.

A police officer walks past Ecuador's embassy in London following a shift change in February 2015. Police ended their expensive 24-hour surveillance of the embassy in October that year. (Suzanne Plunkett/Reuters)

Had the judge ruled in Assange's favour, he would have been free to leave the embassy without being arrested on the British warrant.

However, Assange suspects there is a secret U.S. indictment against him for WikiLeaks' publication of leaked classified American documents, and that the U.S. authorities will seek his extradition.

Earlier this month, Ecuador said it had granted the Australian-born hacker citizenship, as the South American country tried to unblock the stalemate that has kept Assange as its houseguest for 5½ years.

Ecuador also asked Britain to grant him diplomatic status. Britain refused, saying "the way to resolve this issue is for Julian Assange to leave the embassy to face justice."

British prosecutors had opposed the removal of the warrant, saying Assange shouldn't be immune from the law simply because he has managed to evade justice for a long time.

Extradition lawyer Rebecca Niblock of Kingsley Napley said before the ruling that Assange's legal argument was a longshot.

"Failing to surrender to bail is like insulting the court's authority" and unlikely to go down well with the court, she said.

