WikiLeaks founder Julian Assange pictured in 2019
WikiLeaks founder Julian Assange pictured in 2019 AFP

Jailed WikiLeaks founder Julian Assange has been fighting for years to avoid extradition from Britain in connection with the 2010 publication of thousands of US classified documents.

Here is a timeline of his legal troubles after he agreed to plead guilty to revealing military secrets in exchange for his release from prison, ending his years-long legal drama:

In July 2010, Assange's WikiLeaks whistleblowing website begins publishing hundreds of thousands of leaked US military documents about the wars in Iraq and Afghanistan, some of which detail US abuses.

It later follows up with a huge batch of secret US diplomatic cables, which show that Washington spied on the leadership of the United Nations and that Saudi Arabia pressured the US to attack Iran, among other revelations.

In November that year, a Swedish prosecutor issues an arrest warrant for Assange over sexual assault allegations involving two women.

Assange denies the claims, saying they had consensual sex, but is arrested after he reports to police in London. A week later he is released on bail.

In February 2011, a British judge rules Assange can be extradited to Sweden.

He appeals, claiming the Swedish allegations are a pretext to transfer him to the US to face charges over Wikileaks.

In June 2012, he takes refuge in Ecuador's embassy in London. Ecuador, then ruled by left-wing president Rafael Correa, grants him asylum.

In May 2017, Swedish prosecutors drop the sex assault investigation after failing to obtain Assange's transfer.

In December, Ecuador grants Assange nationality but is blocked by Britain from according him diplomatic status.

In January 2018, Ecuador, now ruled by conservative President Lenin Moreno, says hosting Assange has become "untenable".

Tensions peak in April 2019 when Moreno says Assange has "repeatedly violated" the conditions of his asylum and revokes his citizenship.

The next day, British police drag Assange from the embassy and arrest him on a US extradition request.

In May, he is sentenced to 50 weeks in jail for having breached bail in 2010.

The legal process for his extradition to the US begins.

Meanwhile, Swedish prosecutors reopen the rape investigation.

In May 2019, the US Justice Department charges Assange with violating the US Espionage Act by publishing military and diplomatic files in 2010. If convicted, he faces jail terms of up to 175 years.

Assange makes his first court appearance since being jailed via video-link.

In November 2019, Swedish prosecutors drop the rape investigation because "the evidence is not strong enough" despite "credible" claims from Assange's alleged victim.

In February 2020 court hearings, Assange's lawyers claim then US president Donald Trump had promised him a pardon if he denied Russia had leaked him damaging emails about Hillary Clinton ahead of the 2016 presidential election.

The White House denies the claim.

Assange's supporters celebrate after a London court blocks his extradition in January 2021, on the grounds he would be a suicide risk if sent to the US.

But a High Court appeal overturns the verdict and sends the case back to the original court after a US promise he would not be held in isolation in jail and would receive proper medical treatment.

Judges in January 2022 grant Assange permission to appeal. But in March, the Supreme Court refuses to hear the challenge.

On June 17, 2022, the British government approves his extradition in what Wikileaks calls a "dark day for press freedom and for British democracy".

Assange appeals the government's decision.

Assange's wife Stella tells a news conference in February 2024 that her husband "will die" if sent to the US, saying his physical and mental health are "in decline".

In May, Assange wins permission to appeal against the 2022 court ruling that approved his extradition, with a two-day hearing in London later scheduled for July 9.

Assange agrees to plead guilty to a single count of conspiracy to obtain and disseminate national defence information, according to US court documents released on Monday night.

WikiLeaks says "Julian Assange is free," writing on X that he has left prison and flown out of Britain after being granted bail by a high court judge.

Assange is scheduled to appear Wednesday morning local time at a court in the Northern Mariana Islands, a US territory in the Pacific, close to his native Australia.

He is expected to be sentenced to 62 months in prison, with credit for the five years he has already served behind bars in Britain, meaning he can go free.