By James Landale & Tiffanie Turnbull, BBC News
In the end, it was a mixture of diplomacy, politics and law that allowed Julian Assange to take off in a private jet from London’s Stansted airport on Monday, bound ultimately for Australia and freedom.
The deal that led to his liberty – after seven years of self-imposed confinement and then five years of enforced detention – was months in the making but uncertain to the last.
In a statement, the Crown Prosecution Service (CPS) said the possibility of a plea deal “first came to our attention in March”. Since then, it had been advising the United States “on the mechanics” of how to get Mr Assange released and to appear before a US federal judge “in accordance with his wishes and those of the US government”.
But the origins of the deal – after so many years of deadlock – probably began with the election of a new Australian government in May 2022 that brought to power an administration determined to bring home one of its citizens detained overseas.
Anthony Albanese, the new Labor prime minister, said he did not support everything Mr Assange had done but “enough was enough” and it was time for him to be released. He made the case a priority, largely behind closed doors. “Not all foreign affairs is best done with the loud hailer,” he said at the time.
Mr Albanese had cross-party support in Australia’s parliament too.
A delegation of MPs travelled to Washington in September to lobby US Congress directly. The prime minister then raised the issue himself with President Joe Biden at the White House during a state visit in October.
This was followed by a parliamentary vote in February when MPs overwhelmingly supported a call to urge the US and the UK to allow Mr Assange back to Australia.
They lobbied hard the influential US ambassador to Australia, Caroline Kennedy.
A key player was Stephen Smith, who arrived in London as the new Australian High Commissioner in early 2023.
Diplomatic sources said he “did a lot of the heavy lifting, making it a personal thing to get this over the line”.
Mr Smith – who paid an early visit to Mr Assange in Belmarsh prison in April 2023 – was also foreign minister in a former Australian government led by Kevin Rudd, the current ambassador in Washington who was also involved in the negotiations.
Simon Jackman, Honorary Professor of US Studies at the University of Sydney, told the BBC there was a “natural inclination” for Australian governments to support the US but public and political sentiment had shifted just enough in both countries to give Mr Albanese “cover” to agitate for Mr Assange’s release behind closed doors.
Australian ministers even at times compared the detention of Mr Assange to other Australian nationals held as political prisoners by Iran and China.
Greg Barns, a barrister and legal adviser to the Australian Assange campaign, said it was the politics that made a difference.
“The Albanese government was the first to elevate the matter with the US. And Albanese got support from the opposition.
“The treatment [of Assange] stuck in the craw of many Australians. People would ask, ‘where’s the public interest in that?'”
The legal lifeline
Then came the law. On May 20, the High Court in the UK gave Julian Assange a legal lifeline.
It ruled that he could bring a new appeal against attempts to have him extradited to stand trial in the US for obtaining and publishing military secrets.
At this point, he faced multiple charges under the US espionage act: 17 of publishing official secrets, each of which carried a maximum 10-year prison term, and one of hacking, which was punishable by up to five years.
One key part of the judgement was about whether Mr Assange – as an Australian citizen – would be able to use the US constitutional First Amendment right to free speech as a defence.
Nick Vamos, former head of extradition at the CPS and head of business crime at the law firm Peters & Peters, said that the May ruling put pressure on both sides to come to the table and complete the deal.
He said the ruling potentially allowed Mr Assange to argue that publishing secret US information was protected by the First Amendment, something that could have led to “months if not further years of delays and pressure”.
“Faced with this uncertainty and further delay, it looks as if the US have dropped the publishing charges in exchange for Mr Assange pleading guilty to hacking and ‘time served’, finally bringing this saga to end,” he said.
Mr Vamos added that Mr Assange’s legal team would however have recognised that the First Amendment would have made no difference to the separate charge related to hacking.
So even if they eventually saw off the charges relating to the publication of the secret material, there would be no protection against the hacking charges that went alongside them.
“Both sides saw the risks and that brought them to the table,” he said.
Whitehall sources said the date of the next High Court hearing was fast approaching on July 9 and 10 and both sides knew that if they were to agree a deal, it had to happen now.
The politics behind the scenes
As ever, politics also played a part.
The Americans had signalled their willingness to do a deal some time ago. In August last year, Ambassador Kennedy publicly suggested a plea deal could be a resolution to the stand-off, a suggestion ultimately picked up by Mr Assange’s lawyers.
And in April, Mr Biden said he was considering a request from Australia to drop the prosecution.
US diplomats were keen to protect relations with Australia, with which it had agreed – along with the UK – the so-called Aukus defence and security partnership.
The Assange case had been a long-standing irritant in UK-US relations many diplomats were keen to square off.
Speculation grew that the Biden administration wanted the issue resolved before the presidential election in November, and some Assange supporters even suggested the US feared a Labour government in the UK would be less willing to agree to his extradition.
The White House was quick to say on Tuesday that it had played no part in the details of the plea deal – that was a matter for the Department of Justice.
In the end, after all the years of legal and diplomatic dispute, it seems that all sides simply reached a point where they wanted a deal and were willing to compromise to get one.