Mahmoud Ahmadinejad will look on from the sidelines when Iran's high-stakes nuclear negotiations with the United States and five other world powers enter a critical phase next week.
He has been unceremoniously shut out of the process by Iran's supreme leader, Ayatollah Ali Khamenei, who will instead take credit for any face-saving breakthrough that would ease choking western sanctions.
Reflecting the president's frustration, media outlets close to him have been sniping at Tehran's handling of the negotiations, which opened in Istanbul last month after a long hiatus and will resume in Baghdad on Wednesday.
Websites linked to his conservative opponents have hit back hard, with one accusing him of trying to sabotage the talks because he is not involved.
This factional in-fighting in Tehran over the negotiations could potentially block an agreement, some experts fear.
"Ahmadinejad is expected to… [try to] find a way to torpedo a possible agreement that may result from the Baghdad talks," an analysis carried by the American Iranian Council (AIC), a US-based think tank, warned last week.
Equally, the authors, Hooshang Amirahmadi and Shahir Shahidsaless, cautioned that the Baghdad talks could be de-railed if Washington, misled by Iran's calls for "crippling sanctions" to be lifted, becomes over-confident and demands an end to uranium enrichment on Iranian soil.
Other Iran specialists believe Mr Ahmadinejad, whose supporters were trounced by Khamenei loyalists in recent parliamentary elections, will retreat on the nuclear front while trying to bolster his standing on domestic issues.
But he is not doing so quietly.
This week one of his closest allies and top press adviser, Ali Akbar Javanfekr, criticised Iran's approach to the nuclear talks, arguing Tehran's negotiating position is being undermined by some officials and politicians repeatedly for calling for western sanctions to be lifted.
He viewed this as a tactical mistake because it suggests Iran is vulnerable to sanctions, which Mr Ahmadinejad insists are having no impact.
"Due to the treacherous behaviour of some figures and currents at home, we have reached a point that the country's strong and independent economy is tied up to the not-so-important talks in Istanbul," Mr Javanfekr wrote in Iran, a government daily he manages, on Monday.
Mr Ahmadinejad's opponents accuse him of sour grapes.
"Many experts believe this administration's actions are designed to make the [nuclear] negotiations … fail because they are being led by the Revolution's Leader [Ayatollah Khamenei] while the administration is sidelined," Baztab, a conservative news website, declared this month.
Baztab recommended that Mr Ahmadinejad should either be given a "serious warning" not to disturb the process, or that he should be brought into it.
Whether Mr Khamenei has already delivered such a warning is unclear, but it is telling that the president has not criticised the talks directly, leaving that to aides such as Mr Javanfekr.
The nuclear file has always been guarded by Mr Khamenei, but the Iranian president thrust himself to the fore in past negotiations, which he supported. He viewed a deal that would defend Iran's atomic interests while easing tensions with the West as a glittering prize that he would deliver to the Iranian people.
Many Iran analysts believe Mr Ahmadinejad has neither the muscle nor the will to scupper the negotiations because they have the vital imprimatur of Mr Khamenei, who easily has the upper hand in their protracted power struggle.
The ayatollah recently conferred on Iran's chief nuclear negotiator, Saeed Jalili, the title of "personal representative of the Supreme Leader".
"I don't believe Ahmadinejad can derail the negotiations. Khamenei and his supporters want a deal, provided there is a face-saving formula for them," said Muhammad Sahimi, an Iran expert at the University of Southern California.
Mr Khamenei's camp portrayed the Istanbul meeting as a victory against a US-led West that is finally coming to its senses. His supporters insist Iran is in the stronger position and that its adversaries will have to compromise, warning that the talks will collapse unless sanctions are eased.
Western powers, they add, now accept Tehran's right to enrich uranium because they resumed talks while Iran's centrifuges were still spinning in contravention of UN Security Council resolutions.
The negotiations have also caused the "Zionists anguish" by thwarting Israel's attempts to drag its western friends into a new war, "Iran's hardline Siyasat-e Ruz daily, proclaimed this month.
Iran insists its nuclear programme is solely peaceful, rejecting western accusations it is seeking a weapons capability.
Farideh Farhi, an Iran specialist at the University of Hawaii, doubted Mr Ahmadinejad will try to undermine the nuclear negotiations. "A consensus has developed in Iran to pursue talks. Ahmadinejad is part of that consensus and being side-lined is not sufficient to break the consensus."
Ms Farhi added that he is "in any case fully occupied in debates regarding the implementation of the second phase" of his controversial subsidy reform programme.
Mr Ahmadinejad, on his 100th provincial tour, has in recent days been visiting north-eastern Iran where he managed to draw large crowds.
"This has always been his idea, that even when he's under fire at home, he has the support of the people," said Scott Lucas, an Iran expert at Birmingham University in England.