WikiLeaks founder Julian Assange lost a legal bid on Tuesday to persuade the British authorities to drop any further action against him for breaching his bail conditions when he walked into the Ecuadorean embassy in London in 2012.

Assange, 46, fled to the embassy after skipping bail to avoid being sent to Sweden to face an allegation of rape, which he denied. The Swedish case was dropped in May last year, but Britain still has a warrant for his arrest over the breach of bail terms.

Assange has not left the embassy since he first walked in nearly six years ago and his lawyers had argued in a court hearing last week that it was no longer in the interests of justice for British authorities to seek to arrest and prosecute him for skipping bail.

"Having weighed up the factors for and against ... I find arrest is a proportionate response even though Mr Assange has restricted his own freedom for a number of years," judge Emma Arbuthnot said in her ruling at Westminster Magistrates Court.

"Defendants on bail up and down the country, and requested persons facing extradition, come to court to face the consequences of their own choices. He should have the courage to do so too," she said.

Assange's seven-year legal saga

Here are key dates in Julian Assange's extradition battle as the WikiLeaks founder loses his new court bid Tuesday to cancel the UK arrest warrant hanging over him.

- Arrest warrant issued -

In November 2010, a Swedish prosecutor issues a European arrest warrant for Assange on sexual assault allegations involving two Swedish women. Assange denies the claims, saying the young women consented.

WikiLeaks starts releasing more than 250,000 classified US diplomatic cables, revealing frank assessments of US officials as well as the views of other governments.

Some 500,000 classified military documents concerning American diplomacy and the wars in Afghanistan and Iraq had already been released by Wikileaks earlier that year.

In December, Assange turns himself in to police in London and is placed in custody pending a ruling on the Swedish extradition request. He is later released on bail and calls the Swedish rape allegations a smear campaign.

In February 2011, a British judge rules Assange can be extradited to Sweden. In November Britain's High Court rejects an appeal against his extradition. Assange fears Sweden will hand him over to US authorities who could prosecute him for publishing the documents and possibly sentence him to death.

- Seeks refuge at embassy -

In 2012 Assange requests, and is later granted political asylum at the Ecuadorian embassy in London. The following year, Ecuador demands that Britain allows Assange to fly to Quito.

In July 2014 a Swedish court upholds the European arrest warrant against Assange and in November Assange loses an appeal against the arrest warrant.

- UN appeal -

Also in 2014, Assange files a complaint against Sweden and Britain with the UN Working Group on Arbitrary Detention.

His lawyers later petition Sweden's Supreme Court to quash the arrest warrant in February 2015.

The following month, Swedish prosecutors offer to question Assange in London. At Quito's demand, an Ecuadorian prosecutor does the questioning, which takes place in November.

In February 2016, the UN panel confirms its view that Assange has been "arbitrarily detained," saying he should be able to claim compensation from Britain and Sweden. Britain rejects the ruling.

The Stockholm appeals court in September rejects a request by Assange to lift the arrest warrant in light of the UN panel's non-binding legal opinion.

- Beginning of the end? -

In January 2017, WikiLeaks claims "victory" after then US president Barack Obama commutes the sentence of Chelsea Manning, a soldier who leaked a huge amount of defence department files published by WikiLeaks, and who is released on May 17.

Two days later, Swedish prosecutors say they have closed their seven-year rape investigation. In London, police say they are "obliged" to arrest Assange if he leaves the embassy, for breaching the terms of his bail in 2012.

- Ecuadorian citizen -

In January, days after announcing it is seeking a mediator to resolve the standoff with Britain, Ecuador says it has granted Assange citizenship. The Australian became an Ecuadorian citizen on December 12.

Ecuador asks London to recognise Assange as a diplomat, which would give him immunity from arrest. Britain refuses to do so.

Later in the month Ecuador's President Lenin Moreno describes Assange as an "inherited problem" that has created "more than a nuisance" for his government.

Doctors say his embassy stay is dangerous to his health.

On January 26 Assange's lawyers ask a court to lift the arrest warrant. The court rejects the bid on February 6 and then a second attempt on February 13.

Related Story