At 11:24 pm Eastern time on Sunday, President Donald Trump sent an all-caps tweet threatening war with the Islamic Republic of Iran.

Trump had apparently heard part of a recent speech by Iranian President Hassan Rouhani in which Rouhani warned that a US-Iran confrontation would be “the mother of all wars.”

The American president interpreted this as a threat and sent an extremely scary tweet in response.

“To Iranian President Rouhani: NEVER, EVER THREATEN THE UNITED STATES AGAIN OR YOU WILL SUFFER CONSEQUENCES THE LIKES OF WHICH FEW THROUGHOUT HISTORY HAVE EVER SUFFERED BEFORE,” Trump tweeted. “WE ARE NO LONGER A COUNTRY THAT WILL STAND FOR YOUR DEMENTED WORDS OF VIOLENCE & DEATH. BE CAUTIOUS!”

It’s important not to dismiss this as empty Trump rhetoric: War with Iran is an idea that has a lot of support among conservatives and members of Trump’s Cabinet. Both Secretary of State Mike Pompeo and National Security Adviser John Bolton publicly called for airstrikes against Iranian nuclear facilities prior to joining the Trump administration.

With the 2015 Iran deal on the ropes after Trump’s withdrawal, the potential for Iran to restart prohibited nuclear activities has never been greater — and no one is really sure how Trump will respond if that happens.

What this means is that, as scary as it sounds, we have to take the possibility of war with Iran seriously. We need to understand just what such a war would entail and what the consequences would be if it happened.

The best estimates we have suggest it would be a disaster.

Surgical strikes on Iran’s nuclear facilities would only set back the program temporarily, but destroying the country’s nuclear capacity entirely would require a massive military effort. That would kill thousands of people, destroy whatever vestiges of political stability remain in the Middle East, and potentially wreak havoc on the global economy — all while likely failing to permanently end Iran’s nuclear ambitions.

Given that the Iran deal has, so far, successfully rolled back the nuclear program, it’s hard to see why this would be worth it. But here we are.

Why bombing Iran would be ineffective — and potentially catastrophic

Generally, advocates of military action against Iran propose a limited air campaign targeting the heart of Iran’s nuclear program. “An attack need not destroy all of Iran’s nuclear infrastructure,” Bolton wrote in a 2015 New York Times op-ed. “By breaking key links in the nuclear-fuel cycle, it could set back its program.”

The key targets in such proposals are the nuclear facilities at Fordow, Natanz, and Arak (the uranium conversion facility at Isfahan is also often referenced). Activity at these facilities has been slowed or suspended entirely under the nuclear deal, but the buildings have not been demolished. If Iran were to restart its push toward a bomb, then those would be the places it would start — and thus would be the first target in any US attack.

Some of these, Fordow in particular, are fortified, but the US has bunker-buster bombs that are capable of doing real damage to them. But even such “limited” strikes would be a massive military operation.

The first issue is that the US would need to destroy Iran’s air defenses, including fighters and surface-to-air missiles, in order to ensure the bombs hit their targets and to prevent Iran from doing serious damage in response. According to Robert Farley, a professor at the University of Kentucky and an expert on air power, this “would involve long-range bombers, drones, electronic warfare, land-based fighter-bombers, carrier aircraft, and submarine-launched cruise missiles.”

Even the strikes against the nuclear program would need to hit a broad range of targets. Contrary to the assumptions of Iran hawks, the strikes couldn’t be limited to Iran’s big nuclear production facilities. The real problem, according to a RAND Corporation brief by Robert J. Reardon, would be Iran’s centrifuge production facilities. Simply destroying Iranian enrichment plants would not be enough to end the nuclear weapons program if Iran could just build centrifuges for new ones quickly. It’s not actually clear how many such facilities there are.

“Sites that have been identified, or ones that were known in the past, have typically been small, easily concealed from reconnaissance satellites, and located in densely populated urban areas,” Reardon writes. “Failure to destroy these sites would allow the Iranians to rebuild their enrichment program, because the machines could be manufactured relatively quickly.”

If the first round of strikes didn’t destroy every target, the US might need to return again and again. It would require the US to “continue a sustained campaign over a period of time and re-strike after an initial battle damage assessment [if] it is found that further strike sorties are required,” defense analysts Anthony Cordesman and Abdullah Toukan write in a comprehensive 2012 Center for Strategic and International Studies report.

And even that probably wouldn’t demolish the program. “Depending on the forces allocated and duration of air strikes, it is unlikely that an air campaign alone could ... terminate Iran’s program,” Cordesman and Toukan argue.

They’re not the only ones who have come to this conclusion. A panel at the nonpartisan Wilson Center reviewed the military studies on the issue and concluded that even if extended military strikes were carried out “to near perfection,” the best-case scenario is still only a four-year delay in Iran’s progress toward a nuclear weapon.

Ultimately, the only way military force could stop Iran from going nuclear is if the US committed to a more or less indefinite war.

“To fulfill the stated objective of ensuring that Iran never acquires a nuclear bomb,” the Wilson Center report finds, “the U.S. would need to conduct a significantly expanded air and sea war over a prolonged period of time, likely several years.”

The consequences of such a prolonged war, especially in today’s Middle East, would be disastrous. Iran has the power to make an unstable Middle East even worse: It could directly target and kill Americans in the region, exacerbate a number of the region’s festering conflicts, and potentially threaten the global oil supply — and thus the global economy.

Iranian proxy militias could also decide to attack American troops in Iraq if talks fall apart. While the US is particularly exposed in Iraq, it has people and assets across much of the region; Iran, too, has proxies across the Middle East. It’s difficult to imagine Iran staying its hand in the event of an outright US attack.

Iran could also attack oil infrastructure or blockade the Strait of Hormuz, a critical oil shipping route, all of which would have tremendous effects.

”Iran can use a mix of mines, submarines, submersibles, drones, anti‐ship missiles, small craft, and assault forces anywhere in the Gulf region to threaten the flow of oil exports,” Cordesman and Toukan write. “Any major disruption affects the entire economy of Asia and all world oil prices — regardless of where oil is produced. It can lead to panic and hoarding on a global basis.”

In the long run, the deal would work better than strikes

To Iranian President Rouhani: NEVER, EVER THREATEN THE UNITED STATES AGAIN OR YOU WILL SUFFER CONSEQUENCES THE LIKES OF WHICH FEW THROUGHOUT HISTORY HAVE EVER SUFFERED BEFORE. WE ARE NO LONGER A COUNTRY THAT WILL STAND FOR YOUR DEMENTED WORDS OF VIOLENCE & DEATH. BE CAUTIOUS! — Donald J. Trump (@realDonaldTrump) July 23, 2018

Airstrikes would destroy what has been a key constraint on Iran’s nuclear program: the system of international inspections and sanctions that brought Iran to the negotiating table in the first place.

European and Asian countries have given the US strategy much of its force by helping to isolate and sanction Iran; that is what compelled Iran to negotiate and agree to make concessions in the first place. These countries are already angry at Trump for withdrawing from the deal, and seem totally uninterested in reimposing sanctions to try to get “a better deal.”

If the US attacked Iran, the international community would likely be appalled and abandon its support for sanctioning and isolating Iran altogether, leaving the country wealthier and in a stronger diplomatic position.

That would, in turn, cripple any serious attempt to prevent Iran from rebuilding its nuclear program.

”In the absence of clear evidence that Iran was dashing for a bomb,” Georgetown University’s Colin Kahl told Congress in 2012, “a US strike risks shattering international consensus, making postwar containment more difficult to implement. And with inspectors gone, it would be much harder to detect and prevent Iran’s clandestine rebuilding efforts.”

Striking Iran, then, wouldn’t be a “several-day” endeavor, as Sen. Tom Cotton (R-AR), a congressional uberhawk who reportedly has Trump’s ear on national security issues, once suggested. It wouldn’t stop Iran’s nuclear program unless the United States committed to more or less permanent war with Iran — and may not work even then. And it would likely have devastating consequences for the US and its allies.

What’s ironic here is that the nuclear deal is working reasonably well to constrain Iran’s nuclear ambitions. The International Atomic Energy Agency, the organization tasked with implementing the deal, has repeatedly certified that Iran is in compliance with its terms. Given the deal’s strict inspection provisions, it would be very hard for Iran to bamboozle International Atomic Energy Agency inspectors — meaning that so long as it is in place, there’s very little risk that Iran becomes a North Korea-style nuclear threat anytime soon.

So far, the deal is holding even after US withdrawal. But Iran’s compliance is tenuous, and further belligerence from the US could give Tehran a reason to stop abiding by the deal’s limitations.

The logic of threatening a painful, pointless war under these circumstances escapes me. But the president of the United States, and several of his top national security advisers, seems to disagree.