It may appear confusing at first glance that the U.S. is supporting a Saudi-led military intervention against Iran-backed Houthi forces in Yemen while waging its own air campaign in support of Iran’s allies fighting the Islamic State in Iraq and the Levant (ISIL) in Tikrit, Iraq — and negotiating a nuclear accord with Tehran. But there’s a coherent strategic thread linking these three seemingly disparate processes.

Yemen is Saudi Arabia’s neighbor and has traditionally loomed large in its national security thinking. The recent evisceration of Saudi allies in Sanaa suggest Riyadh took its eye off the ball, but Saudi success in establishing a broad coalition to fight the Houthi takeover in Yemen represents a feather in the cap of the new ruler, King Salman. By persuading states such as Turkey, Egypt, Qatar and the UAE to join forces in what they see as a bid to aggressively roll back Iranian influence, Salman has transcended the divisions among Sunni Muslim powers over the Muslim Brotherhood. The Yemen intervention reflects Riyadh’s success in prioritizing the confrontation against Iran, and it is through this lens that the battle in Yemen is now being seen.

For the Saudi-led alliance to win in Yemen entails reinstalling Abd Rabbu Mansour Hadi as president, rolling back Houthi military gains and forming a governing alliance in which the Houthi were at most a distinctly junior partner. Achieving such an outcome could make the Saudi leadership less skittish in its overall regional contest with Iran, which it has been perceived as losing.

Strong backing for the Saudi-led effort in Yemen allows Barack Obama’s administration to dispel the notion — widely (albeit mistakenly) held in Arab capitals and by some critics in Congress and the U.S. foreign policy establishment — that nuclear diplomacy presages a broader U.S. realignment in favor of Iran and at the expense of traditional U.S. allies in the Gulf.

Yemen, moreover, has the advantage of being an arena in which the U.S. and Sunni allies can push back at Iran without threatening Tehran’s vital interests. Iran has a limited stake and less investment in Yemen than it does in Syria, Lebanon or Iraq. There are no selfies of Iran’s Islamic Revolutionary Guards Corps commander Qassem Suleimani living large in Sanaa. The Houthi-Tehran alliance is not as tight as is depicted, and Tehran may well have deemed the Houthi advance in Yemen as an overreach — although once successful, it likely became an opportunity to be leveraged. Iran has certainly left itself plenty of room to retreat in Yemen, which would deflate hyperbolic claims of an Iranian regional surge that are being used to mobilize opposition to a nuclear deal that remains Tehran’s (and Washington’s) greater immediate priority.

The simultaneous U.S. airstrikes in Tikrit suggests a U.S. ability to take a more nuanced approach to its still extensive regional entanglements. By diversifying the range of partners with which it can work, even ad hoc, and encouraging regional initiatives to tackle local problems, the Obama administration is taking another decisive step away from the failed interventionist policies and Manichaean worldview of the George W. Bush years. Sanaa, Tikrit and the nuclear negotiations in Switzerland are all indicative of that trend. Still, they come at a moment rife with risk and possibilities of miscalculation.

There is no guarantee that the Saudi-led military alliance will win a quick and clean victory in Yemen or that its intervention will demonstrate the strength and competence that it hopes will deter Iran. A Saudi failure, stalemate or escalation could boost Arab anxieties over Iran or spark wider clashes across the region that would undermine the Western effort to prioritize fighting ISIL.

Iran, for its part, may not sacrifice its Houthi chip quite so easily; it may be tempted, instead, to suck the Saudis deeper into a costly Yemeni quagmire.

And any sustained U.S. military action in the region, whether to support of old allies or to push back new foes (such as ISIL) carries the risk of blowback or mission creep and of undercutting U.S. goals in Yemen, Iraq and Syria.

With the nuclear talks having reached a challenging phase for Iran regarding the pace of sanctions removal and questions about Obama’s ability to deliver, given Washington’s political divisions, Iranian opponents of nuclear compromise may seek to use developments in Yemen to tilt Tehran’s internal debate in their favor.

And then there is Yemen itself.

Unless the Saudi-led intervention transitions rapidly from military strikes to inclusive diplomacy and governance, Yemen will face further destruction, decay and radicalization, adding to an already formidable array of challenges — from the presence of Al-Qaeda in the Arabian Peninsula and ISIL to impoverishment and environmental degradation. Even if the regional contest playing out in Yemen can ultimately be managed by the external stakeholders, it is likely to come at the expense of the long-suffering Yemeni people.

Daniel Levy is the director of the Middle East and North Africa program at the European Council on Foreign Relations, where Julien Barnes-Dacey is a senior policy fellow.