Julian Assange, the founder of Wikileaks, has left the UK after striking a deal with US authorities. This agreement will see him plead guilty to criminal charges and secure his freedom.

Assange, 52, faced charges of conspiracy to obtain and disclose national defense information, stemming from the Wikileaks files that revealed information about the Iraq and Afghanistan wars. The US government has long argued that these disclosures endangered lives. Over the past five years, Assange has been fighting extradition to the US from a British prison.

Additionally, Assange was embroiled in a separate legal battle in Sweden, where he was accused of rape and sexual assault—allegations he denied. Fearing extradition to the US, Assange sought refuge in Ecuador’s London embassy for seven years. The Swedish authorities eventually dropped the case in 2019 due to the elapsed time, but UK authorities arrested him for failing to surrender to the court.

According to CBS, the BBC’s US partner, Assange will not spend any time in US custody. Instead, he will receive credit for the time served in the UK and will return to Australia, as per a letter from the US Justice Department. On X, the platform formerly known as Twitter, Wikileaks announced that Assange was released from Belmarsh prison on Monday after 1,901 days. He was then seen boarding a plane at Stansted airport, heading back to Australia.

A video shared online by Wikileaks shows Assange, dressed in jeans and a blue shirt, being driven to Stansted before boarding the aircraft. His wife, Stella Assange, expressed gratitude to his supporters on X, acknowledging their years of mobilization to secure his release.

The deal, which includes a guilty plea to one charge under the Espionage Act, is set to be finalized in a court in the Northern Mariana Islands on Wednesday, June 26. The islands, a US commonwealth, are closer to Australia than US federal courts in Hawaii or the continental US. Stella Assange emphasized that the agreement ensures Assange’s immediate freedom once approved by a judge.

Assange and his legal team have consistently claimed that the charges against him were politically motivated. In April, US President Joe Biden considered a request from Australia to drop the prosecution against Assange. In May, the UK High Court ruled that Assange could bring a new appeal against extradition, allowing him to challenge US assurances regarding his trial and free speech rights.

Initially, US prosecutors sought to try Assange on 18 counts, mostly under the Espionage Act, related to the release of confidential US military records and diplomatic messages. Wikileaks, founded by Assange in 2006, claims to have published over 10 million documents, which the US government described as “one of the largest compromises of classified information in history.”

One of Wikileaks’ most notable releases was a 2010 video showing a US military helicopter killing more than a dozen Iraqi civilians, including two Reuters news reporters, in Baghdad. Assange’s collaborator, US Army intelligence analyst Chelsea Manning, was sentenced to 35 years in prison for her role in the leaks, although her sentence was commuted by then-president Barack Obama in 2017.

Assange, who has rarely been seen in public due to ongoing legal battles, has reportedly suffered from poor health, including a minor stroke in prison in 2021.