Iran has freed two Americans held as spies for over two years on bail of $1m after Iraq and Oman mediated for their release.
The country's judiciary confirmed on Wednesday that Shane Bauer and Josh Fattal, both 29, had been released a month after a court sentenced them each to eight years in jail for espionage and illegally crossing the border into Iran. The two men are reportedly preparing to return home.
"Branch 36 of Tehran's appeals court has agreed to commute the detention sentences of the two US nationals to release on a bail of $500,000," the judiciary said in a statement reported by Iran's state-run Press TV.
In July 2009, the men along with their friend, Sarah Shourd, 33, were arrested by Iranian security forces after walking across an unmarked border between Iran and Iraqi Kurdistan.
Shourd was released last September on health grounds, on bail of $500,000 (£324,000) in a similar move. While in prison, Shourd became engaged to Bauer.
Their release comes a week after president Mahmoud Ahmadinejad told two US media organisations that the pair had been granted a "unilateral pardon".
But the following day, Iran's judiciary cast doubt on the release.
It is not clear why Iran has finally decided to grant the two clemency, but analysts have interpreted the move as an attempt to reduce tensions with the international community at the time when negotiations over its nuclear programme are in a stalemate.