Tensions between Iran and the United States are at their highest point in years. The 2015 Iran nuclear agreement is teetering. The Trump administration is using sanctions to strangle the Iranian economy and in May deployed an aircraft carrier, a missile defense battery, and four bombers to the Middle East. Washington has evacuated nonessential personnel from its embassy in Baghdad, citing intelligence suggesting that Iran is increasingly willing to hit U.S. targets through its military proxies abroad.

The United States also stated that Iran almost certainly perpetrated the recent damage to oil tankers flagged by Saudi Arabia, Norway, and the United Arab Emirates (UAE) and claimed that Iran had temporarily loaded missiles onto small boats in the Persian Gulf. In early May, U.S. National Security Adviser John Bolton publicly threatened a response to any Iranian attacks, “whether by proxy, the Islamic Revolutionary Guards [sic] Corps or regular Iranian forces.”

The good news is that the situation is not as bad as it appears. None of the players—with the possible exception of Bolton—seem to really want a war. Iran’s military strategy is to keep tensions at a low boil and avoid a direct confrontation with the United States. Washington struck a tough public posture with its recent troop deployment, but the move was neither consequential nor terribly unusual. If the United States were truly preparing for a war, the flow of military assets into the region would be much more dramatic.

The flight deck of the U.S aircraft carrier USS Abraham Lincoln in the Arabian Sea, May 2019 Garrett LaBarge /U.S. Navy / REUTERS

The bad news is that a war could still happen. Even if neither side wants to fight, miscalculation, missed signals, and the logic of escalation could conspire to turn even a minor clash into a regional conflagration—with devastating effects for Iran, the United States, and the Middle East.

A conflict would most likely start with a small, deniable attack by Iran on a U.S.-related target. Iran’s leaders, in this scenario, decide that it is time to stand up to U.S. President Donald Trump. Shiite militias in Iraq with ties to Iran hit a U.S. military convoy in Iraq, killing a number of soldiers, or Iranian operatives attack another oil tanker in the Persian Gulf, this time causing an oil spill. Tehran knows from past experience that such attacks do not result in direct retaliation from Washington, provided they are somewhat deniable. Iranian proxies in Iraq, for example, killed roughly 600 American soldiers from 2003 to 2011, with few consequences for Iran.

But this time is different. Following the Iranian attack, the Trump administration decides to strike at several military sites in Iran, just as it hit Syrian targets in 2017 and 2018 after the regime of President Bashar al-Assad used chemical weapons. Using air and naval assets already stationed in the Middle East, the United States strikes an Iranian port or hits a training camp for Iraqi Shiite fighters in Iran. Through public and private channels, the U.S. government communicates that it conducted a one-time strike to “reestablish deterrence” and that if Iran backs off, it will face no further consequences. Ideally, the Iranian leadership pulls back, and things end there.

But what if Iran does not respond the way Assad did? After all, Assad was fighting for his very survival in a years-long civil war and knew better than to pull the United States any further into that fight. Iran’s leader has many more options than the beleaguered Syrian president did. The Islamic Republic can use proxy forces in Afghanistan, Iraq, Lebanon, Syria, and Yemen to attack the United States and its partners. It has an arsenal of ballistic missiles that can target U.S. bases in Bahrain, Kuwait, Qatar, Saudi Arabia, and the UAE. Its mines and land-based antiship missiles can wreak havoc in the Strait of Hormuz and drive up global oil prices. Iran has the capacity to shut down a significant portion of Saudi oil production with aggressive sabotage or cyberattacks, and with its paramilitary unit known as the Quds Force, Iran can attack U.S. targets around the globe.

Iran-allied Houthi rebels at a rally in Sanaa, Yemen March 2019 Khaled Abdullah / REUTERS

Between the United States and Iran there is a distinct potential for misunderstanding, not least when both actors are making decisions under time pressure, on the basis of uncertain information, and in a climate of deep mutual distrust. Iran may mistake a one-off strike by the United States as the beginning of a significant military campaign that requires an immediate and harsh response. The danger that the United States will send confusing signals to the Iranians is especially high given Trump’s tendency to go off on Twitter and the fact that his national security adviser has articulated a more hawkish agenda than his own.

The two sides will also face an intense security dilemma, with each side’s defensive measures appearing aggressive to the other side. Suppose that during the crisis the United States decides to send aircraft carriers, battleships, bombers, and fighters to the region to defend itself and its allies. Iran’s military leaders might infer that Washington is gearing up for a bigger attack. Similarly, imagine that Iran decides to protect its missiles and mines from a preemptive U.S. strike by moving them out of storage and dispersing them. The United States might interpret such defensive measures as preparation for a dramatic escalation—and respond by carrying out the very preemptive strike that Iran sought to avoid.

In one scenario, all these escalatory pressures set off a larger conflict. The United States sinks several Iranian ships and attacks a port and military training facilities. Iran drops mines and attacks U.S. ships in the Persian Gulf. Iranian proxies kill dozens of U.S. troops, aid workers, and diplomats in the region, and Iranian missiles strike U.S. bases in Bahrain, Saudi Arabia, and the UAE, causing limited damage. At every turn, Iran tries to save face by showing resolve but stopping short of all-out war; Washington, intent on “reestablishing deterrence,” retaliates a little more aggressively each time. Before long, the two have tumbled into full-scale hostilities.

Even if neither side wants to fight, miscalculation, missed signals, and the logic of escalation could conspire to turn even a minor clash into a regional conflagration.

At this point, the United States faces a choice: continue the tit-for-tat escalation or overwhelm the enemy and destroy as much of its military capabilities as possible, as the United States did during Operation Desert Storm against Iraq in 1991. The Pentagon recommends “going big” so as not to leave U.S. forces vulnerable to further Iranian attacks. Bolton and U.S. Secretary of State Mike Pompeo support the plan. Trump agrees, seeing a large-scale assault as the only way to prevent humiliation.

The United States sends some 120,000 troops to its bases in the Middle East, a figure approaching the 150,000 to 180,000 troops deployed to Iraq at any given point from 2003 to 2008. American aircraft attack conventional Iranian targets and much of Iran’s nuclear infrastructure in Natanz, Fordow, Arak, and Esfahan. For now, the military does not start a ground invasion or seek to topple the regime in Tehran, but ground forces are sent to the region, ready to invade if necessary.

Iran’s military is soon overwhelmed, but not before mounting a powerful, all-out counterattack. It steps up mining and swarming small-boat attacks on U.S. forces in the Persian Gulf. Missile attacks, cyberattacks, and other acts of sabotage against Gulf oil facilities send global oil prices skyrocketing for weeks or months, perhaps to $150 or more per barrel. Iran launches as many missiles as it can at U.S. military bases. Many of the missiles miss, but some do not. Iran’s proxies target U.S. troops in Afghanistan, Iraq, and Syria, and Iranian-backed Houthi rebels in Yemen increase their rocket attacks against Saudi Arabia. Iran may even attempt terrorist attacks on U.S. embassies or military facilities around the globe—but will likely fail, as such attacks are difficult to execute successfully.

Missiles fired during a war game in a desert southeast of Tehran, November 2006 Fars News / REUTERS

Israel might get drawn into the conflict through clashes with Hezbollah, the Shiite militant group and political party in Lebanon. Iran has tremendous influence over Hezbollah and could potentially push the group to attack Israel using its arsenal of 130,000 rockets in an attempt to raise the costs of the conflict for the United States and one of its closest allies. Such an attack will likely overwhelm Israel’s Iron Dome missile defense system, leaving the Israelis with no choice but to invade Hezbollah’s strongholds in southern Lebanon and possibly southern Syria. What began as a U.S.-Iranian skirmish now engulfs the entire region, imposing not only devastating losses on Iran’s leadership and people but serious costs in blood and treasure for the United States, Israel, Lebanon, the Gulf states, and other regional players.

The United States may stumble into the kind of regime change operation it carried out in Iraq and Libya—but this time on a much larger scale.

Even once major military operations cease, the conflict will not be over. Iranian proxies are hard to eradicate through conventional battlefield tactics and will target U.S. forces and partners in the Middle East for years to come. U.S. air strikes would set back the Iranian nuclear program anywhere from 18 months to three years. But air strikes cannot destroy scientific know-how, and the conflict may push Iran to take the program further underground and build an actual nuclear weapon—a goal it has refrained from achieving thus far.

Moreover, even if the United States goes into the conflict hoping only to weaken Iran militarily, it will soon face calls at home and from Jerusalem, Riyadh, and Abu Dhabi to overthrow the Islamic Republic. As a result, the United States may stumble into the kind of regime change operation it carried out in Iraq in 2003 and Libya in 2011—but this time on a much larger scale. Iran today has a population of 80 million, more than three times that of Iraq at the beginning of the Iraq war. The country’s topography is much more challenging than Iraq’s. The cost of an invasion would over time reach into the trillions of dollars. And consider for a moment the destabilizing effects of a refugee crisis stemming from a country with a population the size of Afghanistan, Iraq, and Syria combined.

The United States might instead try to engineer the collapse of the Islamic Republic without invading, as it tried in Iraq in the 1990s. But unlike many Middle Eastern countries that have grown unstable in recent years, Iran is not an artificial creation of European colonialism but a millennia-old civilization whose nationalism runs deep. Iranians are not likely to respond to a major war with the United States by blaming their own leadership and trying to overthrow it. Even if they did, the most likely result would be a transition from clerical rule to a military dictatorship headed by the powerful Islamic Revolutionary Guard Corps. In the worst case, internal collapse would lead to civil war, just as it has with several of Iran’s neighbors, potentially creating terrorist safe havens and enormous refugee flows.

Even short of such worst-case scenarios, any war with Iran would tie down the United States in yet another Middle Eastern conflict for years to come. The war and its aftermath would likely cost hundreds of billions of dollars and hobble not just Trump but future U.S. presidents. Such a commitment would mean the end of the United States’ purported shift to great-power competition with Russia and China.

Most likely, all parties understand these dangers—not least the Iranian government, for which a war with the United States would be particularly catastrophic. And for this reason, both sides will continue to try to avoid an all-out war. But sometimes even wars that nobody wants still happen. The Trump administration and the Islamic Republic should tread much more carefully, lest they send their countries down a dangerous and costly spiral that will quickly spin out of control.