When an unwanted house guest finally departs, the relief is palpable. So it is with the news that Julian Assange has left Britain. On June 24th the founder of WikiLeaks, a website that publishes classified and sensitive information, walked out of Belmarsh, a high-security prison in south-east London where he has spent the past five years, and hopped on a plane to Thailand. From there he is headed to the Northern Mariana Islands, an American territory in the Pacific, where he is expected to plead guilty to one charge of violating America’s espionage laws. That will fulfil his side of a reported deal with the American government, which in return will allow him to go home to Australia.

If the choreography plays out as planned, it will mark the end of a long and unedifying legal drama. Mr Assange was first arrested in Britain in 2010 after Sweden said it wanted to question him over sex-crime allegations (these were later dropped, and he denied them). He claimed asylum in Ecuador’s embassy in London, where he lived for seven years. After Ecuador ran out of patience with him (at one point it claimed that he had smeared faeces on the embassy wall), British police removed Mr Assange and arrested him again.

He was soon being pursued by America’s Department of Justice (DoJ), which wanted him to face charges that he had conspired to hack government computers. In 2010, four years after Mr Assange founded WikiLeaks, the website released hundreds of thousands of classified American military documents, including diplomatic cables and battlefield reports, from the wars in Afghanistan and Iraq. It was the largest such intelligence breach in American military history. Many of these documents are thought to have contained sensitive information which America’s State Department said endangered many innocent individuals.

Mr Assange has been fighting attempts to extradite him to America for years. During this long judicial battle he has polarised opinion. His supporters, who include many celebrities, paint him as a heroic whistleblower. The leaks published in 2010 do include documentation of a travesty: an American Apache helicopter firing at suspected insurgents in Iraq in 2007 and killing a dozen civilians. They also appear to reveal larger estimates of civilian casualties in Afghanistan than had been reported.

Those who would have liked him to stand trial in America regard him as a reckless criminal. If he exposed injustices by publishing unredacted copies of government documents, he also put honourable people at risk. Amnesty International and several other human-rights groups, which are not usually slow to criticise governments, expressed fears that the leaks about Afghanistan could be used to identify and imperil Afghans who had supported America. His lack of judgment was also on display in 2016, when WikiLeaks spread conspiracy theories about Hillary Clinton, the Democratic candidate for the American presidential nomination, and asked Russia for stolen emails about her.

But the central issue is that Mr Assange was accused of breaking the law. His supporters often cite his First Amendment rights, comparing him to a truth-telling journalist. But journalists do not have the right to hack computers; on that ground, America was justified in asking Britain to extradite him.

Showing him some compassion now is also no bad thing. The DoJ had originally charged him on 18 counts, mostly under the Espionage Act. Its part of the plea deal is to drop 17 of them; and because Mr Assange has already served several years in Belmarsh, American prosecutors are not trying to jail him for the charge to which he pleads guilty. Mr Assange is not a hero, and does not deserve martyrdom. A plea deal is a suitable ending to a grubby saga.

© 2024, The Economist Newspaper Limited. All rights reserved. From The Economist, published under licence. The original content can be found on www.economist.com