Two US hikers who were arrested in Iran on suspicious of spying, have been released on bail.

Shane Bauer and Josh Fattal are believed to have left Evin prison amid reports they have been flown out of the country.

The pair were arrested in 2009 after crossing into Iran from Iraq, where they said they were hiking, and were sentenced in September this year.

Iran's judiciary reportedly set each bail at five billion rials ($500,000).

The two men, both 29, left the prison compound just minutes after their Iranian attorney, Masoud Shafiei, said he had finished the paperwork for their release, obtaining the signatures of two judges on a bail-for-freedom deal.

He told AFP news agency the bail funds had been provided by the state of Oman, a US Gulf ally which has good relations with Iran.

The pair are believed to have been part of a convoy of Iranian, Swiss and Omani cars which left the prison shortly afterwards.

However, Shafiei denied the reports they had already exited the country, and told Reuters the men were still at the airport in Tehran.

"Immediately after their release, the two American nationals left for Mehrabad airport," the official Irna news agency reported.

US officials said they would only release a statement on the developments once the men had left Iran.

Bauer and Fattal maintain they strayed into Iran accidentally while walking in the poorly-marked border region.

A third American, Sarah Shourd  – who was arrested with them – was freed on bail last year on humanitarian grounds and returned home. She did not return to face trial, saying the experience would have been too traumatic. Bauer and Shourd became engaged while in prison.

The three were arrested in July 2009 after travelling to the Kurdistan region of Iraq for a week's holiday. They were stopped and arrested by Iranian troops who told them they were in Iranian territory.

Bauer and Fattal were convicted in September of espionage and illegal entry. Ms Shourd pleaded not guilty in absentia but did not return to stand trial, citing ill health.

US Secretary of State Hillary Clinton said she was "deeply disappointed" by the sentences, saying it did not bode well for Us and Iran relations.

Earlier this month, Iranian President Mahmoud Ahmadinejad had said Bauer and Fattal would be released within days, but officials later denied that any decision had been reached.