I’ve been having it out with plenty of folks lately regarding the Iranian nuclear deal. Last week’s speech by Israeli Prime Minister Benjamin Netanyahu to the American Congress summarized pretty well why there are doubts about the deal, which would leave Iran’s nuclear program intact but short of weaponizing.

Essentially, it boiled down to ideology and trust. Iran, go those against the deal, is nuts, and will lie and cheat in order to accomplish its final, insane goal: the destruction of Israel using nuclear weapons.

The idea that Iran is crazy, alas, isn’t borne out by facts. Here’s why.

The cliff notes! To make skimming easy.

It is entirely possible for a state to be run by madmen, but impossible for that state to survive for very long.

Iran’s system of government very intentionally favors rational calculations, albeit flavored with Shi’a conservatism and anti-Westernism.

Thanks to that system, Iran has compromised before to survive, and is compromising again now.

Iran’s overall goal regarding its nuclear program is security, but if security can be gained minus the cost of nuclear weapons, that’s all the better for Tehran.

So, can nation-states be run by the mad? Well, yes, but look at their record.

We break states and international actors into two groups: rational and irrational. Rational groups make decisions that prolong their survival. They cut deals, they retreat, they change course. A rational actor doesn’t have to be moral; in fact, often, the least moral are also the most rational. Having a high body count in your civil war can actually be proof of your rationality: you are willing to kill as many as necessary to stay in power.

An irrational actor, on the other hand, is deeply ideological, unwilling to compromise, and is, overall, pretty consistent. They don’t care what circumstances are; they’ll carry out their political program regardless of the cost, even when evidence is overwhelming their program is causing their downfall.

The best historial comparison between a rational actor and an irrational one are Stalin and Hitler. Hitler was, ultimately, irrational, and carried out his Mein Kempf as directly as he could. When evidence was overwhelming that his politics were causing the destruction of Germany, he stubbornly held on, with Nazi Germany becoming more and more radical the more battles it lost. Had Hitler been rational, his victory in France in 1940 would have been cause to pause, conserve, and prepare for the next round. Instead, he pushed on with a premature invasion of the Soviet Union, as dictated by his politics that demanded land in the east for Germans.

Stalin, conversely, was ultimately a rational actor. Rather than push on to Western Europe, or start World War III over Berlin in 1948, Stalin was willing to concede to Western power there. He kept the Korean War a war by proxy; he solidified Communist gains in Eastern Europe rather than trying to grow beyond the USSR’s capacity.

However, both men are great examples of actors switching from rational to irrational and vice versa. Hitler was comparatively rational in the 1930s, rebuilding Germany and outmaneuvering the West in early conquests. His plunge into irrationality occurred after the fall of France, which convinced him he and his armies were invincible.

Stalin, on the other hand, was comparatively irrational in the 1930s, embarking on mass famines and industrialization programs that cost the USSR a great deal of power in the pursuit of Communism. That nearly cost him his empire; the lesson was learned, and Stalin was far more disciplined in the 1940s.

The end result was thus: Hitler led Germany into destruction after a mere 6 years of war, while Stalin ruled the USSR for 30 years until his death.

So irrational states and leaders don’t last long because they make bad decisions.

That’s common sense. Crazy people self-destruct. Crazy leaders are ousted or destroyed by outside powers. This is one reason North Korea is not crazy; no state lasts 65 years run by madmen.

A modern example of an entirely irrational state is Islamic State. They are utterly irrational; not because they murder people, but because they murder too many people. They have intentionally antagonized everyone but the most radical of Sunni Muslims. This means that their system can only last so long. They will either self-destruct, like Hitler, or they will adapt and moderate, like Stalin.

And certain systems encourage crazy, while other systems discourage it.

Democracies are, thus far, the best political systems for empowering rational leaders. A leader who merely hints at being mad is unable to advance in the system. Should a democracy elect a nutty leader, opponents can employ recall elections, impeachments, parliamentary revolts, court orders, and other mechanisms exist to put an end to them making bad decisions.

Other systems that empower single leaders or small groups of leaders – dictatorships like Hitler’s – are more likely to let crazy seep in. Should that leader lose their grip on reality, for whatever reason, the system has few ways to correct it other than through dangerous power struggles, coups, revolutions, and civil wars.

The more divided a system is, the more rational it’s likely to be. This leads us to Iran.

Iran is not a monolithic dictatorship, but nor does it deserve the title of ‘republic.’

Iran’s current government model can’t fall under the sway of a single, mad ruler. The Islamists who took power in 1979 designed a system that was meant to avoid a repeat of the Shah, who did run a very centralized system. (And look what he did with it.) They also meant to guarantee the Islamist nature of their government.

So they established a system of checks and balances, but one that empowered clerics over career politicians. While the Supreme Leader holds sway over key aspects of the country, he does not have direct control of Parliament or the President. He himself is watched over by a council of experts, who screen candidates for elections beforehand to ensure they are sufficiently Islamist.

That may seem like a system geared to bringing in only the more firebrand of Islamists, but the actual result is factionalism. While everyone must be Shi’a and a career Islamist, not everyone must agree on the specifics of their Revolution.

The council of experts guarantee that no secularists, communists, democrats, or monarchists slip into the system. This skews the state towards irrational Islamism, but does mean it can self-correct from time to time. A mad Supreme Leader doesn’t mean self-destruction. The council of experts, at the end of the day, could put an end to him, much like Italy’s Fascist Council deposed Mussolini at the height of World War II.

Moreover, by asking for voters to give an opinion, it also means that the state allows some criticism. There are certainly red lines that can’t be crossed, but under Iran’s system thinking the president is a dick, and saying as much, doesn’t always land you in jail.

And when the system doesn’t try to make the voters happy, it risks backlash and even destruction.

The aborted 2009 “Green Revolution” was a wake-up call to Iran’s Islamist rulers. While the Supreme Leader favored the reelection of reliably conservative Mahmoud Ahmadinejad, a good portion of voters felt otherwise. That people power was put down by Iran’s still-effective security forces, but it was a dangerous moment, and it proved that Iran’s society is not nearly as monolithic or united as it’s sometimes portrayed.

History is littered with times when Iran compromised, proving Tehran does want to survive.

Iran in the 1980s was far more fervent than today. This is typical after a revolution; it’s actually typical any time you try something new and shiny. You love it at first, but over time it gets old and you get slack.

Iran’s first major compromise was with its regional “little Satan” – Saddam Hussein’s Iraq. That war was stalemated from 1982 onward, and everybody knew it. Nevertheless, Iran’s revolutionaries refused to compromise until enough Iranians had died and Iranian state power was weakened sufficiently to convince both the population at large and their elites that further war was useless. The hard facts of geopolitics prevented Iran’s numerically superior military from overcoming Iraq’s well-supplied and more professional army.

It was a seminal moment, and where the path of Iran from irrational troublemaker diverged to a nation-state that had learned the hard way it had to play by the rules.

From there, Iran’s elites matured. It learned to fight by proxy, by subterfuge, and it absorbed the lessons begun by Iraq’s invasion in 1980 and cemented by the American victory over Iraq in 1991 – to survive, Iran could not directly challenge the U.S. and the West in general through anything but rhetoric.

While it could harass Israel, it also knew its proxies’ limits. Hezbollah fought a very conventional war with Israel in 2006. That was proof that Iran’s proxies could play by the rules; while Hezbollah very intentionally targeted civilian areas, and used civilians as human shields when it could, this wasn’t all that far off from how European nation-states once fought wars (and how some still do). Moreover, when the UN, speaking as the united voice of the world’s leading powers, demanded the war to end, it did precisely that.

Most Iranian actions since the 1990s have focused on increasing Iranian state power rather than the Shi’a revolution. Thus the alliance with secular Syria, which has no interest in the Iranian political model. When the U.S. neutered Iraqi power in 2003, Iran, rather reasonably, rushed in to make the occupation as expensive and painful as possible for the U.S. to thwart thoughts of a similar invasion of Iran. It also, again reasonably, bought up what influence it could among Shi’a politicians and militias, which meant that when Shi’a took power following the 2005 elections, Iran had more than a few friends in the new government.

But note that Iran has not done what it claimed in 1979 it would do: spread its Islamist Revolution. Iraq is full of Iranian proxies, but none of them primarily seek to export the Iranian revolution. They are jostling for power to create buffer regions for Iran.

Also worth examining is the Iranian cold war with Saudi Arabia, another case of rationality at work.

Saudi Arabia is a comparatively brittle state unsure that the U.S. will always have its back. In times past, its eastern coastline was under Iranian influence and control. That east is also where the vast majority of Saudi Arabia’s oil reserves are; another fine reason for alarm.

So with Iran able to exploit chaos in Iraq and build up a buffer state, Saudi Arabia has been forced to respond more directly. The Syrian Civil War is, beyond its Islamic State dimension, part of Saudi Arabia’s and its key allies’ proxy war with Iran; both hope to bleed one another dry and knock out a potential enemy.

The problem is mainly people can’t tell the difference between what Iran says and what it does.

Iran has kept one aspect of its ’79 revolution: its chants. “Death to America, death to Israel!” is the required cry of those looking for promotion within the Islamic Republic. This, as well as the bluster of both Iranian elites and Iranians themselves, convinces many in the West that Iran seeks nuclear weapons in order to use them against both Israel and the West.

This is entirely without merit. Iran lacks a missile program to reach the continental United States, and any nuclear attack against Israel, while within Iran’s current technical capacity, would result in both Israel and the United States launching a salvo of nukes that would end Iranian civilization. If I know this, so too do the mullahs.

Many will point to Iranian rhetoric that indicates Iranians would happily annihilate themselves if it meant the destruction of both Israel and the United States. The problem is that it’s incredibly unlikely Iran means any of that.

Iranian elites must go through the motions of chanting the same old slogans, but they are the usual political hypocrisy. Their supporters want to hear the words, but Iranian elites have no intention of acting upon them. If Iran was serious, plots against the West would be hard to count. Let’s focus back on Islamic State, a very irrational actor; how many IS-inspired plots have appeared in just the past year? This is an irrational actor walking the walk, whose rhetoric can be trusted to be policy.

While there are plenty of Iranian-linked plots on the radar, including recent ones to kill the Saudi ambassador to the U.S., none of them are in league with al-Qaeda’s 9/11 attacks, nor are any of them big enough in scope to trigger a general war. Instead, much like the Cold War, these attacks are minor jostling for power; the U.S. cyberattacks Iran, Iran tries to shoot an ambassador, and so on.

If you don’t trust your own politicians, why do you trust Iran’s?

It’s a simple enough question: if you don’t trust Obama, why trust Khomeini? Much hinges on ideological beliefs. Iran has been the Bad Guy for so long that it’s nearly become an article of faith among American conservatives.

That being said, a rational, but still nuclear, Iran would be trouble, just not the end of the world.

A nuclear-armed Islamic Republic would still be trouble. First, a nuclear Iran would mean that negotiations failed and Iran had concluded it would be safer with atomic weapons than without them. It would also likely have concluded it could not trust the West or any of the main powers in the Middle East.

That would mean more conflict, but with one new rule: nobody could ever directly attack Iran.

Much as Israel’s nukes make it impossible for anyone to consider wiping out Israel, Iran would be able to arm proxies and act with impunity as it sought to gain security on its own terms. Spurned by the West, it would meddle far more in Iraq, Afghanistan, Syria, and the Persian Gulf. Should a deal fail, it would mean the West would lose any leverage it had over Iran, and Iran would need to grab as many informal buffer states as possible to keep enemies at bay.

At greatest risk would be Kuwait and Bahrain, two Persian Gulf states with enough angry Shi’a to start proper civil wars. Beyond that, Saudi Arabia’s Eastern Province, also chocked full of Shi’a, would be another potential flash point.

A nuclear Iran is one that would feel most insecure, since Iran will only go nuclear if it believes it needs nukes to preserve its regime. Right after, Iran would begin knocking down as many enemy dominoes as possible. With Russian estrangement from the West, it could gain a powerful, if informal, ally in Moscow.

That’s not the same as saying Iran would let the nukes fly, but rather than Iran would stir up trouble for its own ends in as many places as it could.

Again, Iran’s a rational state, so it wouldn’t commit suicide: to date, no nation-state has ever willfully brought about its own annihilation.

But it would use those nukes as a shield. It would guarantee that the only way Iran’s regime could change is if elites within chose to do so; this is what happened in the late Soviet Union, when elites through both the republics and the Communist Party decided to ditch the system. That’s a considerably more peaceful way of bringing about change, but it took a long time, and there were plenty of scary moments in between.

Worse, it could indeed kick off a nuclear domino roll. The United Arab Emirates is already in the midst of an uncontroversial nuclear program; one that plays by the rules, but one that could be weaponized under stressful circumstances. Most likely, the U.S. would have to extend its nuclear umbrella to its allies in the region.

That’s reason to be worried about Iran going nuclear, and reason to try to take a deal that slows down its program rather than eliminates it.

Iran’s elites understand their nuke program is almost the only card they have to play with West. Anywhere else they compete, they know they will lose. Sanctions are breaking Iran’s economy, and long enough hardship invites another revolution.

That being said, there’s such a thing as a nation-state being cornered. Should the West hammer Iran too hard, it risks pushing Iran headfirst into a rush for atomic bombs. An Iran that is too insecure will desperately seek nukes to save itself, so the West must use both carrot and stick. Conditions within Iran are ripe for a deal; that deal will build a bridge that can grow further and further over time.

The alternatives are worse. To tighten sanctions may well scare Iran into developing a nuke; to wage war may beyond anyone’s ability or desire.

But to call Iran and its leaders “crazy” is just too simple for such a complicated place.