Check out ex-spook Bob Baer on power politics in Iran, in TNR:
Iran is not a theocracy. It is a military dictatorship headed by Khamenei and advised by a coterie of generals from the Islamic Revolutionary Guard Corps and the Army, as well as hard-liners in the secret police. Ahmadinejad is little more than the spokesman for this group. He may have a say in the day-to-day management of the economy and other parts of Iranian administration–but all important decisions, particularly those related to Iran’s national security, including rigging presidential elections, are made by Khamenei.
Read the full article.