Ruling hardliners who united behind him to crush the reformist challenge are now locked in fierce competition for Friday's parliamentary elections.
The vote pits supporters of the embattled president against loyalists of Iran's supreme leader, Ayatollah Ali Khamenei, for control of parliament, whose 290 seats are being contested by 3,444 vetted candidates.
The election will be closely watched in western capitals. Success for radical forces could fuel tension over Iran's nuclear programme.
Iran's parliament, known as the Majlis, has little sway over foreign policy or the nuclear issue, which are under Ayatollah Khamenei's control, but its influential national security committee often helps shape his decisions. Thousands of extra security forces will be on the streets to prevent any repetition of the mayhem that followed the 2009 presidential elections.
Disenchanted Iranians are, however, unlikely to protest this time but they may not vote either, denying the regime the large turnout it seeks to legitimise its rule, analysts said.
With Iran under unprecedented western sanctions over its nuclear programme and facing Israeli threats of possible military action, the Iranian authorities have called for "epic" participation in the vote to demonstrate the country's unity against foreign threats.
"The more lively the elections, the greater the Iranian nation's grandeur in the eyes of the enemies," reads a banner in central Tehran, quoting Ayatollah Khamenei.
Another hardline cleric, Ayatollah Makarem Shirazi, has declared that not voting would be a sin.
But the campaign has been distinctly lacklustre in contrast to other lively Iranian elections in recent years, and apathy is said to be high among Iran's 48 million eligible voters.
A political commentator for the Tehran Bureau website, which carries news and expert opinion on Iran, compared the election with a team wrestling bout where two groups grapple fiercely, "cheered on by a small number of supporters at ringside". The vast majority in the packed stadium, however, "are silent and uninterested, because they regard the match as an exercise in futility", Muhammad Sahimi wrote.
Many Iranians see little point in casting their ballot when their last vote counted for nothing because Mr Ahmadinejad's re-election in June 2009 was allegedly rigged.
Also, the poll offers only a strictly limited choice in a system where candidates are screened for their loyalty to the Islamic establishment.
Prominent figures in the popular reformist camp, its two main leaders under year-old house arrest, have refused to stand, although some individual reformists are running on other lists.
The Iranian authorities have also "dramatically escalated" repression of dissent in the run-up to the poll, arresting lawyers, students, and journalists and targeting electronic media, said the human-rights group, Amnesty International, yesterday.
Mr Ahmadinejad fell spectacularly from grace in the eyes of many fellow hardliners last year when he challenged the supreme leader's authority in a public spat over a cabinet appointment.
So bitter is the power struggle between them that Ayatollah Khamenei has warned that he could someday scrap the post of president entirely, replacing the position with a prime minister selected by parliament.
Many conservatives also oppose Mr Ahmadinejad because of his steadfast support for his controversial chief-of-staff and closest ally, Esfandiar Rahim Mashaie, whom they accuse of "bewitching" the president and leading a "deviant", anti-clerical current in his camp.
The Guardian Council, a hardline body that vets candidates, is believed to have barred many of Mr Ahmadinejad's followers from running, forcing him to pick younger political unknowns.
Although loyalists of the supreme leader look set to triumph in the election at the president's expense, some analysts caution against underestimating Mr Ahmadinejad's political resilience.
"I'm not counting out his forces quite yet," said Scott Lucas, an Iran expert at Birmingham University in England.
The president is relying mainly on support for his allies among the poor and rural dwellers.
He may also be helped by divisions within the ranks of his powerful conservative opponents who are putting up rival lists of candidates, fracturing the front against him.
For many ordinary Iranians, however, the vote is a sideshow as they grapple with the daily challenge of making ends meet amid soaring inflation and rising unemployment.
Campaign debates on state television among political figures in recent days have focused mainly on the troubled economy.
Many Iranians blame not only western sanctions for the rising cost of living, but also Mr Ahmadinejad's economic policies. Inflation has soared since he cut subsidies on food and fuel last year.
Meanwhile, an electoral boost for Mr Ahmadinejad's supporters could help ease Iran's tense standoff with the West.
Despite his image in the United States and Europe as a virulent firebrand, the Iranian president has made cautious attempts to reach out to Washington and compromise on the nuclear issue.
Those efforts were thwarted by Ayatollah Khamenei, who has been implacably opposed to the West and its drive to curb Iran's nuclear ambitions.
As a populist, Mr Ahmadinejad knows that opening channels to Washington would go down well with many ordinary Iranians who long for western-style personal freedoms, enjoy American popular culture, and want to end their country's isolation.
Friday's vote will also shape the political landscape for Iran's presidential elections in June next year, when Mr Ahmadinejad is constitutionally mandated to step down after his two four-year terms.
A strong showing by his supporters could rekindle his hopes of installing an ally as his successor, prolonging Mr Ahmadinejad's influence as an elder statesmen and even enabling him to make a Vladimir Putin-style comeback in 2017.
More immediately, success for his allies would remove a threat by his conservative rivals, who dominate the current parliament, to haul him before the legislature for a grilling on his economic policies with a view to possibly impeaching him.
Mr Ahmadinejad has been summoned to appear by March 4, two days after the election.