The confusing signals over the fate of 31-year-old Sarah Shourd - whose planned Saturday release was personally backed by Ahmadinejad - underscore the wider backlash to efforts at expanding his powers and sway over internal policies and Iran's foreign affairs, analysts say.
It also points to one of the main fissures in Iran's conservative leadership: Ahmadinejad and his allies against the powerful judiciary overseen by Iran's supreme leader.
The judiciary head, Ayatollah Sadeq Larijani - who took over shortly after the Americans were detained along the Iraqi border in July 2009 - apparently sees the detainees as his portfolio alone.
On Saturday, the judiciary's website quoted Tehran's chief prosecutor, Abbas Jafari Dowlatabadi, as saying none of the detained Americans would be released "until the end of the legal procedure" and stressed that Shourd would not receive special treatment despite reported health concerns, including a breast lump and precancerous cervical cells.
It's unclear whether the prosecutor was referring to a trial on possible spy charges - which could takes weeks or months - or some other kind of case review. It appears, however, any fast-track release is unlikely.
"By stopping the release of Sarah Shourd, the judiciary sent a strong message to the president that the buck stops with them," said Meir Javedanfar, an Iran expert with the Middle East Economic and Political Analyst based in Israel.
But the rumblings inside Iran's power structure have potential resonance beyond the detained Americans. Pressure from the sources such as the judiciary and parliament - led by Larijani's brother Ali - could undercut Ahmadinejad's ability to fend off domestic complaints.
The list is long and includes a creaky economy, the squeeze of sanctions over Iran's nuclear program and the crackdown on opposition groups who claim he stole last year's election.
"More and more, Iranian lawmakers and officials believe he is ignoring them and acting solely in his own interest," said Javedanfar.
The timing of the planned release of Shourd also could have played a role in the abrupt pullback.
It coincided with the end of the Muslim holy month of Ramadan, a common time to free prisoners in the Islamic world. But it's just weeks before Ahmadinejad's annual trip to attend the U.N. General Assembly - suggesting the judiciary did not want to hand Ahmadinejad potential goodwill points before heading to the United States.
Ahmadinejad also could be looking to soften international outcry over a stoning sentence - now put on hold - for an Iranian woman convicted of adultery in another case that overlaps political sensitivities and the judicial process.
"There are definite lines of division within Iran," said Behzad Sarmadi, a researcher on Iranian affairs at the Dubai School of Government. "It's easy to imagine a case like the American detainees being caught up in the factional disputes."
On Friday, state media reported that Ahmadinejad's intervention helped secure her freedom in part because of the "special viewpoint of the Islamic Republic of Iran on the dignity of women." Reporters were invited to witness her release.
Then, just hours later, judiciary officials said it was off - an embarrassing rebuke to Ahmadinejad and dashing the hopes of Shourd's family.
Shourd and two other Americans, Shane Bauer and Josh Fattal, were detained along the Iran-Iraq border on July 31, 2009. They have been accused of illegally crossing the border and spying in a case that has deepened tensions with Washington - which has led the push from greater sanctions on Iran over its nuclear program.
Their families say they were hiking in Iraq's scenic Kurdish region and that if they crossed the border, they did so unwittingly. Shourd has been held in solitary confinement, and her mother has said she's been denied medical treatment.
They were visited once by their mothers in May in a trip closely covered by Iranian state media.
Two weeks after the Americans were detained, Iran appointed Larijani to lead the country's judiciary. It was the height of the crackdown on dissent amid unprecedented protests and clashes following Ahmadinejad's disputed re-election.
But Larijani pushed back against Ahmadinejad, including warning that security forces and the Revolutionary Guard allied with Ahmadinejad could face prosecution if they overstepped their bounds.
"Larijani is not a fan of Ahmadinejad," said the researcher Sarmadi. "To him, Ahmadinejad represents the militarization of the government with his links to the Revolutionary Guard."
Larijani's brother, Ali, is parliament speaker and Iran's former nuclear negotiator - and considered one of Ahmadinejad's leading rivals among Iranian conservatives.
The judiciary is among the key pillars of authority directly overseen by Iran's highest figure, Supreme Leader Ayatollah Ali Khamenei. The mixed signals over Shourd's release suggests a breakdown in the traditional flow of power - with Ahmadinejad trying to set policies without full clearance from the top.
"You can see this as another sign of cracks in Khamenei's authority," said Patrick Clawson, deputy director of The Washington Institute for Near East Policy.
In an apparent attempt to save face, an unidentified official in the president's office was quoted Saturday by the IRNA news agency as saying the postponement of Shourd's release was due to the Eid al-Fitr holiday. But the timing of the end-of-Ramdan events are known days in advance.
Still, the American woman's lawyer, Masoud Shafiei, said he remains optimistic.
"Since the case has turned into a political and diplomatic issue and many officials have talked about a release, she could be released soon," he said.
But some analysts see a number of factors possibly complicating the release, including whether to be seen as rewarding the United States after it led the push for greater U.N. sanctions over Iran's refused to halt uranium enrichment.
Some Iranian authorities may be leery about the appearance of freeing one of the U.S. detainees as an exchange for Iranian nuclear scientist Shahram Amiri, who returned to Iran in July.
In the past, Ahmadinejad has suggested the three Americans could be traded for Iranians claimed to be held by the U.S.
"This change of plans about the release could be more about foreign policy priorities than factional fighting within the country," said Kaveh Afrasiabi, a California-based author and scholar of Iranian affairs. "This could make things difficult."