Updated

A British judge is set to rule Tuesday on Julian Assange's bid to force Britain to drop a warrant for his arrest, a development that would remove a substantial legal hurdle to his leaving the Ecuadorean Embassy in London that has been his refuge for more than five years.

The legal issues surrounding the WikiLeaks founder's case are complex:

___

WHAT IS BEING DECIDED TUESDAY?

Assange's legal team argued in Westminster Magistrates' Court on Jan. 26 that a U.K. arrest warrant for Assange should be dropped.

Lawyer Mark Summers said the warrant had "lost its purpose and its function" since it's related to a sex crimes investigation against Assange in Sweden that has ended without him being charged with wrongdoing.

Swedish authorities are no longer pursuing Assange, but he still faces arrest in Britain for jumping bail in 2012. British prosecutors told Judge Emma Arbuthnot the U.K. arrest warrant must stand because Assange shouldn't be rewarded for having outlasted Swedish authorities, which dropped the case after concluding there was no reasonable hope of bringing him to Sweden to answer questions.

The judge is expected to give her ruling Tuesday afternoon.

___

WHAT HAPPENS IF ASSANGE WINS?

It's not entirely clear what Assange will do if the judge rules in his favor.

He would be free to step outside the embassy for the first time since June 2012 without facing questioning on the Swedish sex crime allegations or arrest for jumping bail. But he may choose to remain inside because of grave concern that he faces a secret U.S. indictment on charges related to WikiLeaks' disclosure of leaked classified U.S. documents.

WikiLeaks said Tuesday that Assange could face life in prison in the U.S. for a variety of charges including espionage, conspiracy and theft. The group says U.S. grand jury proceedings against Assange began as early as 2010, but it is not publicly known if he faces a U.S. indictment because of the strict secrecy rules governing U.S. grand jury actions.

Several prominent U.S. officials have expressed an interest in prosecuting Assange, and there has clearly been a U.S. investigation into WikiLeaks' activities. British officials would be expected to take Assange into custody if there's a U.S. indictment and extradition request.

___

WHERE WOULD HE GO?

The Australian-born Assange hasn't said what he will do if he wins, decides to leave the embassy and doesn't immediately face extradition to the U.S.

But one attractive option might be to settle in Ecuador, which has granted him citizenship and asylum.

Ecuador has tried unsuccessfully to persuade British officials to give Assange diplomatic status, which might have made it possible for him to leave Britain even if he is sought by U.S. officials.

___

WHAT HAPPENS IF ASSANGE LOSES?

A courtroom defeat would keep the status quo in place.

Assange would still face arrest for jumping bail, although British police no longer maintain a round-the-clock security presence outside the embassy. His lawyers say he is suffering from a variety of mental and physical problems stemming from his long spell inside the building, but there would be no obvious end in sight.