An Australian filmmaker imprisoned in Cambodia for espionage has been granted a royal pardon and is now awaiting deportation.
James Ricketson was arrested in June last year, a day after he was reprimanded for flying a drone over a political rally without permission.
He had been making documentaries in Cambodia for more than 20 years.
Last month he was sentenced to six years' jail after allegations he had been using his documentary projects and humanitarian work to collect information that would jeopardise national security.
On Friday night, Mr Ricketson received a royal pardon, signed by Cambodia's Senate president Say Chhum, who is the acting head of state in the absence of King Norodom Sihamoni, who is reportedly visiting China.
Pardons are normally issued at the request of Prime Minister Hun Sen.
Lieutenant General Uk Heisela, chief of investigations at the Interior Ministry's immigration department, confirmed Mr Ricketson had been transferred from Prey Sar prison directly to the immigration detention adjacent to the Phnom Penh International Airport.
"We are just waiting for the Australian embassy officials to arrive and complete the process, then he will be deported," he said.
When asked if he knew when Mr Ricketson would be on a plane, Lieutenant General Uk Heisela said: "As soon as we have his passport."
Immigration police have since told the ABC James Ricketson will fly out of Cambodia on Sunday.
Australia's Foreign Minister Marise Payne said the Department of Foreign Affairs and Trade would continue to provide Mr Ricketson with consular assistance.
"I welcome the news that James Ricketson's petition for pardon has been approved by the Cambodian government," she said.
"This ends a distressing time for Mr Ricketson and his family.
"I thank my counterpart, Cambodian Foreign Minister Prak Sokhonn, for his government's positive consideration of Mr Ricketson's petition."
Mr Ricketson's son, Jesse, stood outside a restaurant in Phnom Penh with a glass of Prosecco, just metres from where Mr Ricketson was arrested, having been told that is where his father would be dropped off.
He waited for two hours before realising that the lawyers had been given bad information.
"This has been a long and difficult affair - we are eternally grateful to the King for showing compassion and glad that this is over," he said.
"It has been torturous for James's family, and torturous for James. This is the ideal result: he is now free to be back with his family.
"We thought we'd get the chance to meet him, to give him that big hug before he goes back to Australia. Sadly, that's not the way it has gone but he will be back home with family soon and I will get my hug before too long."
About a dozen people who work the streets selling small items and begging also came to see their "godfather".
A tuk-tuk driver who said he had been Mr Ricketson's regular guide since 2002 said he was looking forward to sharing a beer with his old friend, but was now worried that he might never see him again.
"He is a good man," said the driver, who asked not to be named.
"Cambodian people love him, but we don't know if he will be allowed to come back here."
'He's out! It's incredible'
Mr Ricketson's family were surprised but extremely happy to hear he had been pardoned.
His nephew Bim Ricketson said his supporters were over the moon.
"Family and friends and supporters, the whole network there are behind James, we're just overwhelmed with this news," he told the ABC.
"It's incredible. Absolutely blown away, it's amazing. He's out! It's incredible."
In an update to the Change.org page created to pressure the Australian government to intervene in the situation, Mr Ricketson's adopted daughter Roxanne Holmes thanked the petition's 100,000-plus supporters.
"It feels like the pain of the last 14 months has hit me in one go, so many emotions but above all, I am so happy," Ms Holmes wrote.
"Our deepest thanks to all those who have supported us, from Australian filmmakers to politicians and to every single person who signed, shared, called, emailed - you made this happen."
'Shameful that Canberra did not stand up'
James Ricketson, 69, was found guilty by a Cambodian court in late August, after allegations he had been using his documentary projects and humanitarian work to collect information that would jeopardise national security.
Government-friendly media outlets had named him as an "important spy" in a US-led plot to foment a "colour revolution" and overthrow Hun Sen, who has ruled Cambodia for more than 30 years.
But throughout the trial, Mr Ricketson continuously questioned the charges against him, asking who he was meant to be spying for.
"When you get no response and you continue to be locked up, it's very hard to imagine," said Sawathey Ek, a spokesman for the Cambodian Australian Federation who lobbied for Ricketson's release.
Mr Sawathey said he believed the royal pardon came amid pressure from the European Parliament.
"The European Parliament insisted and passed a resolution calling on his release, and the regime knew the European Parliament was going to impose sanctions," Mr Sawathey said.
He called the move a "show of the ruling regime to gain political legitimacy".
The Cambodian community in Australia had lobbied the Australian government to condemn the charges and pressure Cambodia to release Mr Ricketson.
"It is shameful that Canberra did not stand up but instead left it to the European Parliament," Mr Sawathey said.
Mr Sawathey said it was important not to forget the ongoing problem in Cambodia's judiciary system.
"The judiciary is used as a political tool," he said.
Mr Sawathey said they did not yet know the terms of Mr Ricketson's release and voiced concern the charges may not be dropped and he may be prevented from returning to Cambodia or continuing his work in the country.
"We stand ready to support him in terms of not accepting that he has committed any crime," he said.
The accusations against James Ricketson came amid a spate of politically charged moves by Hun Sen's Cambodian People's Party, which was facing perhaps the greatest threat ever to its three-decade rule.
Following the sentencing in August, Mr Ricketson's family and members of the Australian Cambodian community called on the Australian government to put pressure on Cambodia to release him.
The family were concerned about the state of Mr Ricketson's health in the Prey Sar prison, where he was held for 14 months.