The United States and its partners must employ both intense pressure and intense engagement to set the terms for a new relationship with Iran.

As the United States and Iran near an historic nuclear agreement there is an intense debate about whether a deal represents capitulation to Iranian interests in the Middle East or an opportunity to help stabilize the region. If the United States and its partners learn the lessons of previous nuclear negotiations with Iran, and pursue a tightly coordinated strategy in the region, there is a potential over the next few years to ameliorate the conflict-ridden Middle East. For the deal itself is only half the challenge: the other half is to craft a geopolitical framework following the deal that constrains Iranian ambitions.

Since early 2009, President Barack Obama pursued a strategy of engagement and pressure with Iran with regards to the nuclear program, consistently offering to negotiate but also applying increasing economic and diplomatic pressure. But Iran refused to comply.

This approach failed to yield a change in Iranian behavior as long as the Iranian leadership believed that while international sanctions were a nuisance, they did not present a genuine threat. That changed with the application of tough energy and financial sanctions that, starting in 2012, took half of Iran’s oil exports off the market.

As the danger to the Islamic Republic’s survival increased the more pragmatic Hassan Rouhani was elected president in 2013. Iran’s Supreme Leader Ali Khamenei—the final decision-maker in Tehran and a man highly skeptical of the West—gave Rouhani the space to negotiate a nuclear agreement that would obtain sanctions relief in exchange for limits on the program that Khamenei would never have accepted only two years earlier.

When the Supreme Leader changed his mind, there needed to be a channel through which this new attitude could be communicated. The Obama administration’s outreach from 2009-2012 meant that at the critical moment—when Iran became open to an agreement—the United States and Iran were able to pursue secret talks. The talks were facilitated by Oman: an understated and dependable U. S. ally that, nevertheless, enjoys good relations with Iran. Without both vigorous diplomatic outreach and economic pressure, the historic nuclear agreement that the United States and Iran are on the verge of signing would never have come to pass.

American policymakers should learn from this experience. Right now Iran’s position in the Middle East is actually weaker than many believe. Iran’s leadership perceives that it is on the rise with mounting influence in Syria, Iraq, Yemen, and Lebanon. It does not believe that the United States is serious about contesting Iranian leadership in the region. But in reality Iran is not in such great shape. In Syria, it is heavily invested in an increasingly costly quagmire to prop up Bashar al-Assad. In Iraq, its strategy of supporting a sectarian Shia government led by Nuri al-Malaki alienated the Sunnis and spawned the rise of ISIS, creating a dangerous threat on Iran’s borders. Iran is on the verge of committing imperial overstretch in the Levant. And in Yemen, Iranian influence has been overstated by the media: in truth, nobody is in charge there.

Yet, just like in the case of the nuclear program, until the Supreme Leader recognizes the costs of this policy and recalculates it will be impossible to come to a regional accommodation on terms that would be acceptable to the United States and its allies.

Attempts to shift Iran’s calculus have already begun with the Saudi intervention in Yemen, in tandem with a sign that the United States will also play a more assertive role—when it sent the USS Theodore Roosevelt to the shores of Aden, in order to force an Iranian arms convoy headed to Yemen to turn around. Recent military setbacks for the Assad regime may, too, impact Iran’s calculus. In fact, the Saudi air strikes in Yemen and renewed pressure on Assad by the Saudis and others already constitute the post-nuclear accord Middle East: in which America's regional allies realize that henceforth they will have to do more—often on their own—to constrain Iran.

But the United States can also do more with its regional allies to press Iran. This can begin with the development of a cohesive strategy to counter Iran’s influence, which will be discussed later this month when President Obama meets the Gulf Cooperation Council leaders at Camp David. Some components should include greater intelligence sharing, a more assertive maritime policy on interdicting Iranian arms shipments, taking more risks in joint covert operations with Arab partners, and providing training to our Sunni Arab partners that can enable them to counter Iranian proxies.

Even as the United States signals to Iran’s leadership that Tehran's influence has reached its limits, and that it runs a risk of a direct confrontation with the United States, Washington will also need to be open to a potential Iranian shift. Already some in the Iranian system, such as Foreign Minister Javad Zarif, are signaling a desire for a negotiated agreement on regional matters with the United States and its Sunni Arab partners.

In the aftermath of a nuclear agreement, the United States must be open to negotiating regional questions with Iran bilaterally while creating multilateral venues similar to the P5+1 process that was essential for the nuclear negotiations. Such a process would have to include the key regional players and outside powers that have a vested outcome in a political settlement in the Middle East.

Over time, agreements could: end the war in Syria and facilitate Bashar al-Assad’s removal from power; increase cooperation against ISIS; result in a power-sharing arrangement in Iraq that accommodates Sunni, Shia and Kurd; and dampen down the conflict in Yemen. Forcing Assad out of office while securing the safety of his Alawite community may seem a long shot, but whatever the odds, it constitutes a circumstance simply impossible to bring about without coordination with Iran. Otherwise, the chaos may only deepen in Syria, with a radical Sunni jihadist regime coming to power.

One thing is a near certainty, though. The only way to make a nuclear accord work in our favor is if the United States and its partners employ both intense pressure and intense engagement to set the terms for a new relationship with Iran. The Middle East will be in a state of low-intensity conflict for the foreseeable future. The lines drawn are mainly sectarian. We already have close partnerships with Sunni regimes: we need also to be talking with the Shia power in the region.

Ilan Goldenberg is director of the Middle East Security Program at the Center for a New American Security, where Robert D. Kaplan is a senior fellow.

Image: Flickr/U.S. Embassy Vienna