Esteemed expert on Middle Eastern affairs Daniel Pipes suggests that Iranian President Mahmoud Ahmadinejad may be ratcheting up his nuclear ambitions because of his belief in an imminent Islamic apocalypse.
Mahdaviat derives from mahdi, Arabic for "rightly-guided one," a major figure in Islamic eschatology. He is, explains the Encyclopaedia of Islam, "the restorer of religion and justice who will rule before the end of the world." The concept originated in the earliest years of Islam and, over time, became particularly identified with the Shi‘ite branch. Whereas "it never became an essential part of Sunni religious doctrine," continues the encyclopedia, "Belief in the coming of the Mahdi of the Family of the Prophet became a central aspect of the faith in radical Shi‘ism," where it is also known as the return of the Twelfth Imam. ...
As mayor of Tehran, for example, Mr. Ahmadinejad appears to have in 2004 secretly instructed the city council to build a grand avenue to prepare for the Mahdi. A year later, as president, he allocated $17 million for a blue-tiled mosque closely associated with mahdaviat in Jamkaran, south of the capital. He has instigated the building of a direct Tehran-Jamkaran railroad line. He had a list of his proposed cabinet members dropped into a well adjacent to the Jamkaran mosque, it is said, to benefit from its purported divine connection.
He often raises the topic, and not just to Muslims. When addressing the United Nations in September, Mr. Ahmadinejad flummoxed his audience of world political leaders by concluding his address with a prayer for the Mahdi's appearance: "O mighty Lord, I pray to you to hasten the emergence of your last repository, the Promised One, that perfect and pure human being, the one that will fill this world with justice and peace."
So, if I understand at all, Ahmadinejad expects this Mahdi to appear at any moment to give victory to Iran. That may be why he's taking harder stances rather than backing down... he expects supernatural assistance.