A British judge is scheduled 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 January 26 that a UK 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 UK 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 plans 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 US indictment on charges related to WikiLeaks’ disclosure of leaked classified US documents.

It’s not publicly known if he faces a US indictment because of the strict secrecy rules governing US grand jury decisions. Several prominent US officials have expressed an interest in prosecuting Assange, and there has clearly been a US investigation into WikiLeaks’ activities. British officials would be expected to take Assange into custody if there’s a US indictment and extradition request.

Where would he go?

The Australian-born Assange hasn’t made his intentions clear if he wins, decides to leave the embassy and doesn’t immediately face extradition to the US.

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.

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.