In this May 20, 2010, file photo, American hikers Shane Bauer, left, Sarah Shourd, center, and Josh Fattal, sit at the Esteghlal Hotel in Tehran, Iran.
The proposed bail-for-freedom deal for two Americans jailed as spies looked increasingly Wednesday like a repeat of last year's release of their companion: Quarrels between Iran's judiciary and president, and then a private jet dispatched by the sultan of Oman for the captives' first leg home.
But even as Washington expressed hope that Shane Bauer and Josh Fattal could be nearing the end of more than two years in custody, the details of when or even if they will be freed remained
clouded amid the complexities of internal Iranian politics and third-party diplomacy between Washington and Tehran, two longtime foes.
The first twist came from Iran's powerful judiciary, which said it was still reviewing the bail provisions and handing a potentially embarrassing rebuke to President Mahmoud Ahmadinejad after his prediction that the Americans could be released in a matter of days.
The statement by the hard-line judiciary appeared to be a message that only its officials and not the president can set the terms of any possible release. Ahmadinejad is locked in a
bitter power struggle with Iran's ruling clerics who control the courts.
It also could be a swipe at his hopes of timing the release of Bauer and Fattal with his expected arrival in New York next week for the U.N. General Assembly session.
Just hours after the judiciary's declaration, however, the Gulf state of Oman dispatched a private plane to Tehran, according to an official of Oman's Foreign Ministry.
The Omani official gave no further details on any possible timetable for the release of the Americans, who were detained along the Iran-Iraq border in July 2009 along with friend Sarah Shourd.
The Omani official spoke on condition of anonymity because of the sensitivities of the negotiations.
But the Omani intervention suggested movement on the complicated dealings over the total $1 million bail.
It all was a near mirror image of the prelude to Shourd's release last year. First, Iran's courts bigfooted Ahmadinejad after his announcement of a $500,000 bail deal and then set the ground
rules for her to eventually fly out on an Omani royal jet just as Ahmadinejad was heading for New York.
Oman has close ties with both Tehran and the Washington and plays a strategic role in the region by sharing control with Iran of the Strait of Hormuz at the mouth of the Gulf, which is the
route for 40 percent of the world's oil tanker traffic.
The Americans' defense attorney, Masoud Shafiei, told The Associated Press he is moving ahead with the bail arrangements with Swiss Embassy officials, who represent U.S. interests in Iran because there are no diplomatic relations between the two countries. There were no details given on the source of the money.
On Tuesday, Shafiei said the court handling the case had set bail of $500,000 each for the Americans.
"I have informed both the hikers' families and the Swiss Embassy, which represents the U.S. interests, and as soon as the bail is prepared, we will deposit and, God willing, they will be
released,'' he said.
In Washington, State Department spokesman Mark Toner said the U.S. was trying to glean more information on the status of the Americans through Swiss diplomatic channels.
``We're encouraged by what we've heard out of Tehran,'' Toner said. ``We're hopeful that we'll see a positive outcome.''
The Iranian judiciary statement suggests that the bail plan for Bauer and Fattal still needs to be approved by the higher ranks in Iran's legal system, which include members of the theocracy's inner circle.
"Two American citizens charged with espionage have not been released. Request from lawyers of these two defendants to issue bail and free (them) is under study,'' the state-run Islamic
Republic News Agency quoted the statement as saying.
``Information about this case will be provided by the judiciary.
Any information supplied by individuals about this is not authoritative,'' the statement added in a clear jab at Ahmadinejad.
Bauer and Fattal, both 29, were sentenced last month to three years each for illegal entry into Iran and five years each for spying for the United States. They have denied the charges and
appealed the verdicts which leaves the opening for bail. Shourd's case remains open.
The Americans say they may have mistakenly crossed into Iran when they stepped off a dirt road while hiking near a waterfall in the semiautonomous Kurdish region of northern Iraq.
Washington has appealed for the two men to be released, insisting that they have done nothing wrong.
Ahmadinejad, in an interview aired Tuesday on NBC's "Today'' show, predicted the Americans could be freed "in a couple of days.'' He described the bail offer as a "humanitarian gesture''
and repeated complaints about attention for Iranians held in U.S. prisons.
Shourd lives 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 Shroud while in prison.
The last direct contact family members had with Bauer and Fattal was in May 2010 when their mothers were permitted a short visit in Tehran.
Their case closely parallels that of freelance journalist Roxana Saberi, an Iranian-American who convicted of spying before being released in May 2009. Saberi was sentenced to eight years in prison, but an appeals court reduced that to a two-year suspendedsentence and let her return to the U.S.
At the time, a spokesman for the Iranian judiciary said the court ordered the reduction as a gesture of "Islamic mercy'' because Saberi had cooperated with authorities and expressed
In May 2009, a French academic, Clotilde Reiss, also was freed after her 10-year sentence on espionage-related charges was commuted.
Last year, Iran freed an Iranian-American businessman, Reza Taghavi, who was held for 29 months for alleged links to a bombing in the southern city of Shiraz, which killed 14 people. Taghavi
denied any role in the attack.
The possible release of the two Americans would remove one point of tension between Iran and the United States, but suspicions still exist on both sides and no thaw is in sight.
Washington and European allies worry Iran is using its civilian nuclear program as cover to develop atomic weapons and have urged for even stronger sanctions to pressure Tehran. Iran denies any efforts to make nuclear weapons.
Iran, meanwhile, is deeply concerned about the U.S. military on its borders in Iraq and Afghanistan, and sharply denounces U.S. influence in the Middle East.