Two Americans jailed for spying in Iran will be released in two days, Iranian President Mahmoud Ahmadinejad has told US media.
Shane Bauer and Joshua Fattal were imprisoned for eight years last month.
The pair, in custody since their arrest in July 2009, claimed they strayed into Iran accidentally while hiking near the border.
An Iranian judge told the BBC he would release the men on payment of $500,000 (£316,000) bail each.
Mr Ahmadinejad revealed the news in an interview with NBC’s Today show.
In a separate interview with the Washington Post, the Iranian president described the release as a “unilateral pardon” and a “humanitarian gesture”.
In the more than two years that Josh and Shane have been in Evin prison, they were led to believe on several occasions that their release was imminent and then their hopes were shattered.
Most recently, just before their sentence was made public, Hassan Danai Fard, the Iranian ambassador to Iraq, and Iranian Foreign Minister Ali Akbar Salehi said they were expecting an imminent release.
If the two Americans are indeed released in the coming days, it will be hard to ignore the timing.
Wednesday marks one year since Sarah Shourd was freed.
Last year President Ahmadinejad tried to use her release as a PR coup as he arrived for a session at the United Nations’ General Assembly.
So the latest move could be seen as another attempt by the attention-seeking Mr Ahamadinejad to create great fanfare ahead of his imminent trip to New York.
‘No intelligence link’
Mr Ahmadinejad has previously stressed the independence of Iran’s judiciary.
He added that the men would be “free to choose” how they returned to the US.
The case heightened tensions between the US and Iran, with US Secretary of State Hillary Clinton saying she was “deeply disappointed” by the sentences.
US President Barack Obama has denied the men had any link to the country’s intelligence organisations.
Their expected release comes ahead of Mr Ahmadinejad’s expected trip to New York for a meeting of the UN General Assembly on 22 September.
The BBC’s James Reynolds says the case is highly political and the announcement’s timing may have been an attempt to secure the Iranian president a warmer welcome.
Mrs Clinton said she was “encouraged” by Mr Ahmadinejad’s comments.
Shane Bauer (left) and Joshua Fattal have been in custody since July 2009 “We obviously hope that we will see a positive outcome from what appears to be a decision by the [Iranian] government,” she added.
The families of the two men said in a statement that they were “overjoyed” by the news.
“Shane and Josh’s freedom means more to us than anything and it’s a huge relief to read that they are going to be released,” they said.
US officials said they were working with Swiss envoys, who represent US interests in Iran, to confirm the men’s status, having had no independent confirmation of the release terms.
The bail sum is the same as set for the release of Mr Bauer’s fiancee, Sarah Shourd, 32, who was arrested with the two men.
It is likely payment will have to be arranged through third parties which maintain diplomatic relations with Iran because of US economic sanctions.
The Gulf state of Oman facilitated the release of Ms Shourd, a teacher, writer and women’s rights activist, who was freed in September 2010 on humanitarian and medical grounds.
Sarah Shourd was released from Iran on humanitarian and medical grounds She did not return to face trial, saying she had suffered post-traumatic stress and would find going back to Iran too traumatic.
Mr Bauer, a freelance journalist, and Ms Shourd had lived in the Syrian capital Damascus after meeting while organising demonstrations against the US-led invasion of Iraq.
Mr Fattal, an environmentalist and teacher, had travelled to Damascus in 2009 to visit his friends.
The trio – all graduates of the University of California, Berkeley – had gone to Iraqi Kurdistan for a week’s holiday.
They had visited the tourist village of Ahmed Awa, and hiked along a trail local residents had recommended, Ms Shourd said.
While out walking they were stopped and arrested by Iranian troops who told them they were in Iranian territory.