Media Matters asks exactly the right question: why has Iran been “just months away” from developing thermonuclear weapons for so many years?

As I have been saying since the drumbeat for war began in the Bush years, the regime in Iran is a rational actor. To understand why Iran has a nuclear program at all, and why that program is probably not a weapons program, you must begin by rejecting the idea that Shiite lunatics are eagerly preparing for the end of the world.

The clerical regime has been nothing if not pragmatic over the years — it is chiefly concerned with its own legitimacy and survival. Regime rhetoric is not solely religious in character, but highly nationalistic. Persians are very proud of their independence, so reliance on foreign powers for the necessities of modernization has always been a source of discontent in Iran.

From these truths, the rest follows.

Begin with this chart, which shows the long-term success of the regime’s electrification program — one of a very few economic development successes of Iran’s post-revolutionary era. It comes from this .PDF report by the nonprofit Helio International:

By 2003, 99.7% of rural villages with more than 20 families had been electrified and nearly 97% of Iranians had electricity access. Yet with the region’s second highest population and an enormous youth bulge maturing, this success story has been endangered by a straining electric grid. In short, the regime still needs to add more electricity generation, and lots of it.

Iran already gets most of its energy from natural gas. Its oil reserves are practically the country’s only export, and with prices reaching $150 a barrel again it is easy to see why selling that oil makes more sense than burning it for power. The clerics have also disinvested in oil drilling over the years, sacrificing long-term productivity in favor of supporting the welfare state that keeps the regime in power. Since Iran has its own uranium mines, nuclear power makes an extremely attractive option.

Furthermore, Iran wants to control the fuel cycle on its own. Negotiated plans to process fuel via Brazil or Russia always fall through because they would make Iran dependent on foreign states for something the regime reckons critical to its continued existence. Given the complicated and often aggressive history of Russian-Persian relations, it should not be a surprise that the regime does not want to rely on anyone in Moscow.

So now we can answer the question: “why has Iran been ‘just months away’ from developing thermonuclear weapons for so many years?” The answer is that Iran hasn’t been anywhere close to developing a nuclear weapon, but that nation has zealously guarded its capacity to develop nuclear energy. And because the regime has placed its development programs safely underground where Israeli jets cannot bomb it, fears of an Iranian bomb have been compounded by regime secrecy. That may be deliberate, even with no weapons program.

This is an important point: just as Saddam Hussein developed a policy of not letting inspectors prove he didn’t have chemical or biological weapons, Iran may have a policy of not letting the world prove it doesn’t have a nuclear weapons program, either. Saddam relied on that uncertainty to keep his enemies at bay; the same may be true of Iran.

The International Atomic Energy Agency made an attempt to visit a possible warhead testing site the other day, leaving Tehran in frustration when officials denied them access. But that action proves nothing about the facility in question except that Iran doesn’t want it inspected. In the Byzantine calculus of Persian politics, this makes just as much sense as proof against Iranian nuclear weaponization as for it.

Moreover, this behavior feeds the reactionaries abroad — neocons, Israel hawks, etc. — and the regime knows it. They have always relied on the Israeli and American threat as a bogeyman to explain their own relative lack of success in economic development, so international nuclear tensions actually serve their domestic interests.

Incredibly, the answer to Media Matters’ question is that fear of a chimerical Iranian nuclear “threat” serves both the regime and its opponents — and has for a long time. If that sounds too complicated for you, then you’ve never studied Iran’s government, constitution, or power arrangements, which “complicated” doesn’t even begin to describe.