The real explanation is surprisingly simple: Ahmadenijad is positioning Iran to become a world superpower, and to a great extent he has already succeeded.
What makes a superpower? Part of it is military might, to be sure, but a more important component is the ability to lead. Ahmadenijad's rhetoric is not aimed at his people; rather he is stepping into the vacuum that the Islamic world has had for decades - trying to become a leader in the war against Islam's enemies.
There is a strong religious component to this desire, as I have mentioned before and as this article spells out very well, but it appears that Iran's president is aiming not only to make Iran the religious center of Islam, but the political center as well.
How does one assert political leadership of the Muslim world?
- Take the one issue that all Muslims agree on (the destruction of Israel) and outdo all of the others.
- Take on the undisputed existing world leader, showing bravery where everyone else is frightened.
- Create the most powerful military in the Islamic world, one that now threatens the West.
- Strengthen industry and scientific R&D to become technologically independent of the enemy:
The Supreme Leader pointed to the threat posed by the global arrogance led by US against different nations and said that under such circumstances, there is not way but, to get stronger, rely upon Almighty God and bolster self-confidence to make use of domestic potentials.
Ayatollah Khamenei said that nations should get stronger in the field of economy, science and politics, adding that reinforcing military and defensive capability is a major need for the nations.
- Act as a leader, speaking for other countries (notice the use of the plural "nations" in the quote above)
- Improve economic and political ties with more neutral countries. (A significant percentage of the Iranian news agency's stories are about economic initiatives with Europe, Asia and Africa - Iran hardly feels isolated even after its verbal provocations.)
- Attack the enemy militarily (Hezbollah, Iraq)
Looking at the world map with this perspective, Iran's "bloc" already includes essentially the entire Arab world, much of Africa, Pakistan, North Korea and probably Indonesia. Russia and China are pretty much neutral, although some former Soviet republics are solidly in the Islamic camp. India may not be Islamic but it has more Muslims than any Muslim country.
And as European countries becomes more Islamic and remain dependent on Islamic oil, it is not entirely clear that they are solidly in the US camp in this battle - a significant part of their population is very sympathetic to an anti-Western viewpoint. Iran is not only aiming at increasing its power, but in isolating the US as well.
Nuclear capabilities, along with missile technology, will cement Iran's leadership status as the world's second superpower. And the Iranians have already noted that North Korea became a nuclear power without the West stopping them, and they fully expect that while the protests will be noisier, things will end up exactly the same for them.
From all appearances, it looks like they are right.