Iranian authorities say two Americans detained in Iran will be released on bail.

On Tuesday, in an exclusive interview with Mahmoud Ahmadinejad, NBC reported that Shane Bauer and Josh Fattal, who were recently convicted of espionage and sentenced to eight years in prison, will be released in two days.

Meanwhile, their defence lawyer, Masoud Shafii, told the BBC that the appellate court has agreed to allow the defendants’ release on bail of $500,000.

Iranian media have reported on the appellate court’s decision, but the families of the two detainees have yet to react to the news.

Bauer and Fattal were arrested together with their companion Sarah Shourd for illegal entry in the summer of 2009 in the Iran-Iraq border region. Espionage charges were later added. Shourd was released last year for medical reasons and is currently in the U.S.

Last month, Bauer and Fattal were given three-year sentences for illegal entry and five years for spying for U.S. intelligence services. Shafii appealed the court’s decision and called for their release on bail.

In addition to allowing their release, the appellate court decision lets them return to the U.S.

The Iranian judiciary has not released details of any conditions of release.