TEHRAN, Iran -- By now, President Mahmoud Ahmadinejad is well-accustomed to enduring blows from Iran's ruling clerics, as his reputation has fallen from favored son to political outcast. But their intended parting shot, barring his chief aide from the presidential race, may be just the opening act in Mr. Ahmadinejad's reinvention as a self-styled opposition force.
Mr. Ahmadinejad vowed Wednesday to use what clout he has left to challenge the ruling by election overseers to block his protege from the June 14 ballot to pick Iran's next president. His chances of success are likely very small. Yet his refusal to accept the ruling clerics' judgment is a sign that his political transition is already underway from an insider at odds with the leadership to an outsider with the potential to be even more disruptive.
Mr. Ahmadinejad, once seen as firmly within the theocracy's fold, is now viewed by the leadership as a troublesome maverick after trying to challenge Supreme Leader Ayatollah Ali Khamenei's authority. The rejection Tuesday of his confidant, Esfandiar Rahim Mashaei -- though widely expected and greatly overshadowed by former President Akbar Hashemi Rafsanjani also being ruled unfit for the race -- marks an important crossroads for Mr. Ahmadinejad.
He is left politically adrift, with no clear candidate to back and a highly uncertain future after he steps down. He could seek an alliance with one of the eight candidates approved by the ruling clerics -- nearly all close allies of Ayatollah Khamenei -- by offering his still-significant popular base, mainly in rural and poor areas that benefited from his government's development projects and handouts.
But more likely is that Mr. Ahmadinejad could try to carve out his own political movement as an alternative voice in a country facing a multitude of problems, including an economy dragged down in part by sanctions over Tehran's nuclear program.
Iran already has a range of political factions, from ultraconservative to liberal-leaning. But none stand out as a credible opposition force since the Green Movement was crushed after Mr. Ahmadinejad's disputed 2009 re-election. Any political group he leads could become a powerful platform for self-promotion and keep his successor off-balance.
Iran's theocracy seeks to end the internal political battles with its slate of establishment-friendly candidates. Instead, Mr. Ahmadinejad could play the role of spoiler. "A victim of injustice" is how Mr. Ahmadinejad described Mr. Mashaei's exclusion from the ballot.
His comments were in clear contrast to Mr. Rafsanjani, 78, perhaps Iran's pre-eminent elder statesman, who appeared to accept the decision by the Guardian Council, which whittled down a list of 686 hopefuls. His campaign manager, Eshagh Jahangiri, told the semiofficial ISNA news agency Wednesday that Mr. Rafsanjani "will not protest" the decision, despite his stature as one of the leaders of the 1979 Islamic Revolution and his 1989-97 tenure as president.
A rejection from the ballot risked the decision being interpreted as an indictment against the system itself. In the end, the ruling clerics sought to finesse the snub by citing concerns about his age and suggesting that he remains too divisive to return to Iran's highest elected post.
No such hand-wringing was needed for the protege of Mr. Ahmadinejad, who is barred from running because of term limits. The blackballing of Mr. Mashaei is an extension of internal power struggles launched by Mr. Ahmadinejad that tried to challenge how Iran is run: All major powers and policymaking is reserved to Ayatollah Khamenei, the supreme leader. The president's portfolio mostly involves domestic affairs and conveying the ruling cleric's views on the world stage.
Mr. Ahmadinejad's bid to expand the presidential reach was a costly miscalculation. It collapsed his standing with Ayatollah Khamenei, who had stood by him during the 2009 protests, and greatly undercut his influence. Dozens of Mr. Ahmadinejad's allies have been arrested or politically marginalized.
Mr. Mashaei was spared detention, but faced a sweeping character assassination from Khamenei loyalists. It included being cast as head of a "deviant current" that sought to undermine Iran's Islamic system through claims of greater allegiance to a Shiite messianic figure known as the hidden imam. Critics even accused Mr. Mashaei of using sorcery to fog Mr. Ahmadinejad's mind.
None of the fallout has weakened Mr. Ahmadinejad's support for his aide, whose daughter is married to the president's son. Mr. Ahmadinejad led a campaign roadshow for Mr. Mashaei under the slogan "Long Live Spring."
Mr. Ahmadinejad now has just one last play: humbling himself and appealing directly to Ayatollah Khamenei to overrule the Guardian Council and place Mr. Mashaei on the ballot. The president said he would go through with it, but chances for a Khamenei reprieve are extremely slim.