Freedom is in sight for Julian Assange after reaching a plea deal with US authorities, as his wife welcomes an end to a decades-long legal ordeal.
The Wikileaks founder, 52, has been fighting extradition to the US over espionage charges for obtaining and publishing classified information.
But on Tuesday, Australian time, he agreed to plead guilty as part of a deal with US prosecutors, ending his imprisonment in London's notorious Belmarsh prison and paving the way to return to Australia.
His wife Stella Assange told the BBC there had been an agreement in principle between the Wikileaks founder and the US Department of Justice, which would need to be signed by a judge before he could fly to Australia.
Assange arrived in Thailand on a lay-over before he will fly to the Northern Mariana Islands, a US territory in the Pacific, where he will appear at a hearing and plead guilty to one count of conspiring to obtain and disclose classified US national defence document
His wife said while there had been uncertainty about the situation leading up to Assange being released from prison, she was "elated" at the developments.
"I don't want to say too much until it's been signed off by a judge, but the important thing here is that the deal involved time served, that if he signed it, he would be able to walk free," she said.
"It's a whirlwind of emotions. I mean, I'm just elated. Frankly, it's just incredible."
Wikileaks, the website Assange created in 2006, announced the deal on Tuesday in a social media post.
Assange "paid severely" for holding the powerful accountable for their actions and upholding the people's right to know, the organisation wrote on X, formerly Twitter.
Australia has long called for the US to end its pursuit of Assange.
Prime Minister Anthony Albanese had raised the issue with US President Joe Biden and in September politicians from across Australia's political spectrum converged on Washington to lobby US decision makers.
Mr Albanese declined to comment on the case in parliament, citing the ongoing legal proceedings, but reiterated his desire to see his detention brought to an end.
"Regardless of the views that people have about Mr Assange's activities, the case has dragged on for too long," he said.
"There is nothing to be gained by his continued incarceration and we want him brought home to Australia."
Opposition foreign affairs spokesman Simon Birmingham, Greens senator David Shoebridge and Nationals senator Matt Canavan welcomed the decision.
Former Australian high commissioner to the UK Alexander Downer, who served while Assange was seeking asylum in the Ecuadorian embassy in London, said he would not receive a hero's welcome in Australia.
"What he did was a criminal offence, and it was a terrible thing to do, morally as well, and endangering people's lives in that way," he told the BBC.
"It's just completely inappropriate and I don't think many Australians have sympathy for him."
Assange's mother Christine Assange said his release shows "the importance and power of quiet diplomacy".
"Many have used my son's situation to push their own agendas, so I am grateful to those unseen, hard-working people who put Julian's welfare first," she said.