Wikileaks founder Julian Assange will walk free after agreeing to plead guilty as part of a deal with the U.S., according to court filings made Monday.
The agreement would see Assange pleading guilty to one charge of conspiring to obtain and disclose classified U.S. national defense documents.
The deal is still to be approved by a U.S. federal judge.
Assange is expected to attend a hearing on the island of Saipan on Wednesday before returning to Australia, the court documents state.
He is accused of having stolen and published secret material from U.S. military operations in Iraq and Afghanistan together with whistleblower Chelsea Manning, allegedly putting the lives of U.S. informants in danger.
His supporters see Assange as a journalist who brought war crimes to light.
British police arrested Assange in 2019 at the Ecuadorian embassy, where he had taken refuge for seven years, for failing to surrender to an earlier warrant linked to Swedish charges that were eventually dropped.
The police swooped in after Quito revoked Assange's asylum status.
Wikileaks said Assange, an Australian citizen, left the high-security Belmarsh prison in London on bail Monday and had departed the U.K. from Stansted Airport at 5 p.m. local time (4 p.m. GMT).
"Julian Assange is free," a post on the Wikileaks account on social media platform X said.
"He left Belmarsh maximum security prison on the morning of 24 June, after having spent 1901 days there. He was granted bail by the High Court in London and was released at Stansted airport during the afternoon, where he boarded a plane and departed the U.K.."
The post was followed by a brief video appearing to show Assange being driven to the airport and boarding an aircraft.