Thailand has freed three Iranian men jailed over a 2012 bomb plot following the release of British-Australian academic Kylie Moore-Gilbert by Iran.
Iranian media say the releases are part of a swap for the lecturer, who was held on spying charges she denies.
Two Iranians had been deported, while a third was pardoned in August, Thai officials said. The botched bombing in Bangkok was apparently aimed at Israel.
Australian Prime Minister Scott Morrison described her release as a miracle, saying she seemed in good spirits when he spoke to her.
"The injustice of her detention and her conviction, Australia has always rejected, and I'm just so pleased that Kylie's coming home," he told local network Nine.
Mr Morrison declined to comment on whether a swap had taken place, but said no-one had been released in Australia.
His government has been silent on the circumstances surrounding the deal, and some observers have said it could encourage Iran, which is accused of "hostage diplomacy".
According to Thai authorities, the three Iranians were not exchanged with anyone.
The kingdom's Department of Corrections said Masoud Sedaghatzadeh and Saeid Moradi were transferred back to Iran on Wednesday under a mutual treaty on prisoners. It named the third man freed as Mohammad Khazaei, saying he had received a royal pardon in August and was released in September.
The trio had been jailed over a plot that Israel said was aimed at its diplomats. It came to light when bombs apparently detonated by accident in a house in suburban Bangkok on 14 February 2012.
Moradi was jailed for life for attempted murder after he threw a bomb at police as he tried to escape. He lost his legs in one of the explosions. Khazaei, who was detained at the airport, was jailed for 15 years.
Sedaghatzadeh fled to Malaysia and was later extradited to Thailand.
'Never been a spy'
News of the exchange first came on Wednesday in a statement on the website of the Young Journalist Club, a news website affiliated to state television in Iran.
"An Iranian businessman and two Iranian citizens who were detained abroad on baseless charges were exchanged for a dual national spy named Kylie Moore-Gilbert, who worked for the Zionist regime," it said.
Video of the exchange was published by state broadcaster IRIB news and the Tasnim website.
نخستین تصویر تبادل جاسوس صهیونیستی با سه تاجر ایرانی pic.twitter.com/Y0lEIFLY5J— باشگاه خبرنگاران جوان | YJC (@yjc___agency) November 25, 2020
The footage, which had no commentary, showed the Melbourne University lecturer wearing a grey hijab and being driven away in a mini-van. Three men are seen being met by officials - one is in a wheelchair.
Australian Foreign Minister Marise Payne said she was "extremely pleased and relieved" at the release of Ms Moore-Gilbert which she said "was achieved through diplomatic engagement with the Iranian government". She made no reference to any exchange of prisoners.
Kylie Moore-Gilbert had been travelling on an Australian passport when she was detained at Tehran airport in 2018 as she tried to leave following a conference.
In letters smuggled out of Tehran's Evin prison earlier this year, the Cambridge-educated academic said she had "never been a spy" and feared for her mental health. She said she had rejected an offer from Iran to become a spy.
"I am not a spy. I have never been a spy, and I have no interest to work for a spying organisation in any country," she wrote.
Iran has detained a number of foreign nationals and Iranian dual citizens in recent years, many of them on spying charges. Human rights groups have accused Tehran of using the cases as leverage to try to gain concessions from other countries.
They include British-Iranian charity worker Nazanin Zaghari-Ratcliffe, who was jailed on spying charges in 2016. She has always maintained her innocence.
Anoosheh Ashoori, a retired civil engineer from London, was jailed for 10 years in July 2019 after being convicted of spying for Israel's Mossad intelligence agency.