After more than two years in custody, the two American hikers jailed as spies in Iran were released on $1 million bail Wednesday and flown out of the country. Hit the jump to read the rest of the story.

Iran’s state news agency IRNA said the two left Iran just as darkness fell in the capital. An Omani official told The Associated Press the men were flying to the capital, Muscat. He spoke on condition of anonymity because he was not authorized to speak to the media. He did not say how long the two men will stay in the Gulf state before heading home to America.

Shane Bauer and Josh Fattal, both 29, who are friends from their days at the University of California at Berkeley, were released into the custody of an Omani delegation.
The two were arrested along the Iran-Iraq border in July 2009 and sentenced in August to eight years in prison. A third American in the group, Sarah Shourd, was freed last year on bail.
Iranian President Mahmoud Ahmadinejad, who visited the United Nations in New York Tuesday, had reconfirmed the country’s commitment to release the hikers.
“I did say within the next few days and I still say the same thing. And God willing they will be released very soon,” Ahmadinejad told ABC News.
Shafiei said the bail of $500,000 for each of the men was posted after some last-minute problems in the bank were resolved. He did not say what the source of the money was.
Last week, Oman dispatched a plane belonging to the Gulf country’s ruler to fetch the two Americans if the freedom-for-bail was reached.
Omani officials, who maintain good relations with both Iran and the U.S., reportedly played a key role in negotiations with Iran and may have paid the $1 million bail. They only said the private plane, sent from Muscat to the Iranian capital last Wednesday, was still in Tehran.
Their families say they were just hiking in northern Iraq’s scenic and relatively peaceful Kurdish region when they may have accidentally strayed over the unmarked border with Iran.
Since her release last year, Shourd has lived in Oakland, California. Bauer, a freelance journalist, grew up in Onamia, Minnesota, and Fattal, an environmental activist, is from suburban Philadelphia.
Bauer proposed marriage to Shourd while in prison.