By defying the West, rejecting talks and issuing scarcely credible promises to build 10 new uranium enrichment plants, he is hoping to whip up a nationalist fervour that will distract attention from Iran's deepening domestic troubles.
It is a high-risk strategy, not least because Iran's opposition politicians are as committed to the nuclear program as he is.
Iran's nuclear program is popular, even among the country's Western-minded urban elite, though the question of whether it is for civil power or weapons is seldom discussed openly.
To most Iranians, the program is a source of national pride and a sovereign right that offers reassurance to a nation that feels isolated and vulnerable.
Iran is a Farsi-speaking Shia Muslim state in a region dominated by Arab countries with Sunni majorities. It is surrounded by US forces in Iraq, Afghanistan and the Gulf and threatened by Israel's nuclear arsenal. Above all, it recalls vividly how the West backed Saddam Hussein in the Iran-Iraq war of the 1980s, despite his use of chemical weapons.
Internal competition over the nuclear issue is in grave danger of escalating Iran's confrontation with the West.
It may backfire domestically, too.
Circumstances have changed dramatically in Iran this year and the nuclear card may well have lost its domestic potency.
Iranians are questioning the cost of the program as unemployment and inflation are soaring, factories are closing and industrial unrest is spreading.
Their economic hardship will become much worse if Ahmadinejad proceeds with his plan to save $US100 billion ($109.7bn) a year by cutting subsidies on petrol, electricity, water, food, health and education.
Some, including Ahmadinejad himself, argue that imposing sanctions over Iran's nuclear program will serve only to unite the Iranian people.