Julian Assange, the founder of WikiLeaks, has agreed to plead guilty to a single felony count of illegally acquiring and releasing national security data in exchange for his release from a British prison.

The development brings an end to his lengthy and bitter dispute with the United States.

Barring any last-minute hiccups, the agreement would bring an end to the long-running battle that began in the 2010s, when Mr Assange became a hero and a villain for releasing state secrets.

In a brief court petition made public on Monday, Mr. Assange, 52, was granted his request to appear before a judge at one of the federal judiciary’s most remote outposts, the courthouse in Saipan, the capital of the Northern Mariana Islands.

He is also anticipated to receive a sentence of around five years, which is similar to the time he served in Britain.

It was a fitting conclusion to the case against Mr Assange, who had virtually refused extradition to the US mainland.

However, the islands are in the United States Commonwealth, in the middle of the Pacific Ocean, and therefore far closer to Mr Assange’s native nation of Australia.

According to Wikileaks, Mr Assange departed London immediately after the agreement was exposed.

He is set to appear in Saipen at 9 a.m. local time on Wednesday.

In a letter to the judge in the case, Matthew J. McKenzie, an official in the Justice Department’s counterterrorism section, stated that Mr. Assange is anticipated to return to Australia “at the conclusion of the proceedings.”

Stella Assange, Mr Assange’s wife, released a video of him completing documents and boarding a plane on Tuesday morning.

Mr Assange rose to international fame in 2010 after Wikileaks disclosed diplomatic and military materials linked to the Iraq and Afghanistan wars, which had been obtained by Chelsea Manning, an Army intelligence analyst.

His issues began in 2012, when he fled to the Ecuadorean Embassy in London to avoid extradition to Sweden, where he faced an investigation into rape and sexual assault allegations, which were ultimately dismissed.

Mr Assange remained at the embassy for seven years before being expelled in 2019.

The United States eventually issued an indictment against Mr Assange and requested his extradition, accusing him of breaching the Espionage Act for his role in the 2010 disclosures and conspiring to break into a Pentagon computer network.

He was, however, convicted to 50 weeks in jail in London for violating bail conditions relating to the rape investigation and remained at Belmarsh Prison, where he married his long-term partner in 2022.