In the international negotiations that resulted in the 2015 agreement to limit Iran’s nuclear activities, I led the team of American diplomats representing the United States. During the talks, my Iranian counterparts would occasionally ask how they could be assured that any deal we struck would be durable. Most Republicans opposed it, and looking at the forthcoming 2016 U.S. presidential election, the Iranians wondered what would happen if the GOP took the White House. I would answer by asking them a similar question: “What if hard-liners opposed to the deal regained power in Iran?” It usually ended the discussion, as I thought it should: after all, I always expected that the greatest challenge to the deal’s success would be violations by Iran, not the political machinations of the president of the United States.

Of course, I was wrong. In May of this year, U.S. President Donald Trump decided to pull the United States out of the agreement and reimpose the U.S. sanctions on Iran that the deal had lifted, a move that will go down as one of the worst foreign policy blunders in U.S. history. The Iran deal was not perfect; no deal ever is. Nonetheless, the Joint Comprehensive Plan of Action (JCPOA), as the agreement is formally known, offered the best possible assurance that Iran would never obtain a nuclear weapon.

I don’t know if the Iran deal can survive the reinstatement of sanctions, which the United States set aside in exchange for the Iranians’ pledge to vastly reduce their uranium enrichment, produce no weapons-grade plutonium, and allow international inspectors to rigorously verify their compliance. The JCPOA’s restrictions close every possible path for Iran to obtain fissile material for a nuclear weapon. Although some of the restrictions that the deal places on Iran end after 10, 15, 20, or 25 years, its prohibition on Iran’s obtaining a nuclear weapon never ends. So far, the Iranians have stuck to the terms of the deal.

Trump’s decision has shaken the world’s faith in the United States’ commitment to multilateral diplomacy. No matter how much Trump derides the deal, the JCPOA stands as a model for combining the threat of sanctions and continued isolation with the hard work of negotiating, even between countries whose relationships are shaped by conflict and distrust. Before Trump undercut it, the JCPOA was advancing U.S. interests and making the world safer. Far from being “the worst deal ever,” as Trump likes to say, it represents a model that his administration should emulate as it negotiates with North Korea over its nuclear arsenal. In that situation, Trump has relied mostly on threats, bluster, and rosy pronouncements. But as he and his team are learning, direct talks with adversaries are difficult. They require courage, persistence, and a realistic sense of one’s own power.

Trump speaks to reporters in the White House after announcing his intention to withdraw from the JCPOA, May 2018. Jonathan Ernst / Reuters

AN INVITATION TO TALK

Most of Iran’s contemporary leaders came of age around the time of the Iranian Revolution of 1979, when supporters of the Muslim cleric Ayatollah Ruhollah Khomeini allied with other dissidents to overthrow the shah of Iran. Later that year, a group of Iranian university students, devout followers of Khomeini, occupied the U.S. embassy in Tehran and took 52 Americans hostage. Many high-level officials in the Iranian regime directly participated in the revolution; some were even involved in the hostage-taking. Their success stunned the world, and a sense of shared experience still holds Iran’s fractious political elite together. That revolutionary posture is crucial to understanding how the Iranians approached the nuclear negotiations.

The regime in Tehran maintains a kind of split personality. The country’s supreme leader, Ayatollah Ali Khamenei, and the elected government led by President Hassan Rouhani sit atop what is, by Middle Eastern standards, an enviably stable society. At home, the country hosts a large, educated middle class, and the regime has so far managed to ward off most internal challenges to its power—albeit with brute force. Abroad, it has projected its power: supporting the Lebanese terrorist group Hezbollah in its campaigns against Israel, backing Shiite militias in Iraq, and helping Syrian President Bashar al-Assad wage a savage civil war in Syria.

But underneath the surface of authoritarian control at home and confident risk-taking abroad, Iran’s leaders are profoundly insecure. They consider themselves besieged by anti-Muslim Western powers, led by the United States, that are obsessed with overthrowing the Islamic Republic and that collude with its rivals to deprive it of its rightful role as a regional hegemon. In the face of such threats, the regime demonizes the United States as a way of making itself look heroic to its own citizens.

This is the leadership that President Barack Obama reached out to in hopes of stopping the regime’s development of a nuclear weapon. In his first inaugural address, Obama addressed the theocrats in Iran and other authoritarian regimes: “We will extend a hand if you are willing to unclench your fist,” he pledged. The prospect of such engagement was a 180-degree turn from the approach to Iran that U.S. presidents had taken for almost a quarter century. The United States first applied sanctions to the Islamic Republic in the aftermath of the hostage crisis. Then, in 1984, after determining that the Iranian government had been involved in the bombing of a U.S. Marine barracks in Lebanon the prior year, which killed 241 U.S. service members, the Reagan administration levied further sanctions against Iran. During the Clinton administration, Washington banned investment in Iran’s oil fields by U.S. energy companies. And in the wake of the 9/11 attacks, President George W. Bush famously accused Iran of being part of an “axis of evil” and used sanctions to punish foreign entities that traded with the Islamic Republic.

The regime in Tehran maintains a kind of split personality.

In 2003, the UN Security Council, the major European powers, and Iran began negotiating over Iran’s nuclear activities. But just three years later, those talks broke down. At that point, the United States and the UN imposed sanctions on Iran with the specific intention of curbing the regime’s ability or inclination to acquire the elements of a bomb. From then on, the EU and the so-called P5+1—the five permanent members of the UN Security Council (China, France, Russia, the United Kingdom, and the United States) plus Germany—pursued a coordinated strategy: offering Iran a path to escape the sanctions by abandoning its enrichment program while constantly upping the economic cost the Iranians paid for their intransigence.

In 2006, Iran already appeared to be operating a uranium enrichment program with a cascade of 164 centrifuges at its main facility in Natanz. By the time multilateral talks were back in full swing, in 2013, harsh sanctions had been in place for years. Yet Iran now had 19,000 operating centrifuges. Sanctions might have hurt Iran’s economy, but they hadn’t done much to thwart the country’s nuclear ambitions.

Hawks in Washington (and in Israel and Saudi Arabia) had long advocated military strikes to eliminate Iran’s nuclear facilities. But just as sanctions alone did not force Iran to change course, military strikes would not have magically induced the Iranians to forget how to make bombs; air strikes could at best set back, but not end, its nuclear project. Even advocates for bombing put the hypothetical delay at three to five years. Meanwhile, an attack would have given Iran an excellent excuse to accelerate its efforts—and to do so with even greater secrecy.

Obama had no illusions that the Iranians would rush to dismantle a nuclear program they’d put so many resources into constructing. So in addition to making clear his interest in talking, he took unilateral action to impede Iran’s progress. In 2011, The New York Times reported that a computer virus known as Stuxnet had been released into the Atomic Energy Organization of Iran’s network, disrupting the country’s uranium-producing centrifuges. Obama also commissioned a new 30,000-pound bomb that could penetrate Iran’s underground enrichment facility at Fordow. And the administration carried out an increasingly harsh regime of economic sanctions, which involved coaxing other countries to stop importing Iranian oil. The president’s goal, however, wasn’t to merely threaten the Iranians. It was to pressure them into negotiations.

GETTING TO YES

I first formally met the men who would become my counterparts in the negotiations, Abbas Araghchi and Majid Takht-Ravanchi, in September 2013 in New York, during the meeting of the UN General Assembly. Earlier that summer, Rouhani, the reform candidate in the Iranian elections, had been elected president of Iran. Rouhani had appointed as his foreign minister Mohammad Javad Zarif, who had attended San Francisco State University and received his doctorate in international affairs from the University of Denver. Zarif was a dedicated revolutionary: as a student, he had occupied the Iranian consulate in San Francisco to force out diplomats whom Khomeini considered insufficiently devout. But he was also comfortable with Americans. In the early 1980s, he returned to the United States to work at the Iranian mission to the UN, ultimately rising to the position of ambassador.

Now, as Rouhani’s newly appointed foreign minister, Zarif had returned to his old stomping ground, charging around Manhattan with his customary brio and enthusiasm. Araghchi and Takht-Ravanchi came along as Zarif’s rather more sober deputies. Their other purpose in coming to New York was to meet with U.S. Deputy Secretary of State William Burns and Jake Sullivan, who had been director of policy planning under Secretary of State Hillary Clinton and was now Vice President Joe Biden’s national security adviser. For months, Burns and Sullivan, along with a small team of negotiators from the State Department and the White House, had been secretly meeting with Araghchi and Takht-Ravanchi in the tiny Persian Gulf sultanate of Oman—the first extended talks between U.S. and Iranian officials since the fall of the shah.

John Kerry speaks with Mohammad Javad Zarif in Vienna, January 2016. Kevin Lamarque / Reuters

In 2012, Qaboos bin Said, the sultan of Oman, had reached out through a mutual acquaintance to John Kerry—then a U.S. senator and chair of the Senate Foreign Relations Committee—with an offer to foster friendlier relations between the United States and Iran. Kerry made a series of visits to Oman—scouting trips to verify that the sultan could actually help create a back channel through which U.S. officials could communicate with decision-makers in Iran, including Khamenei. Later that year, Sullivan, along with a White House Middle East specialist named Puneet Talwar, flew to Oman to meet with Iranian officials. They reported back to Obama and Clinton that the Iranians seemed serious about responding to the president’s offer to talk.

Now, Burns wanted to introduce me, as the undersecretary of state and the person charged with driving the official negotiations, to Araghchi and Takht-Ravanchi, to put names to faces in anticipation of the day when the back channel and the formal talks would be melded. It was a rather stiff meeting. Araghchi and Takht-Ravanchi were reserved. In keeping with the customs of their conservative brand of Islam, neither offered to shake my hand. Still, they encouraged us to consider Rouhani’s election as a new start to the negotiations. We knew that Rouhani wanted to improve relations with the West. Sanctions had made day-to-day life difficult for ordinary Iranians: owing to massive inflation, many people had taken to carrying huge stacks of cash to pay for household items. Rouhani had run on a pledge to raise the standard of living, and Zarif’s appointment as foreign minister indicated that, unlike his predecessor, the provocative hard-liner Mahmoud Ahmadinejad, Rouhani was ready to deal. Rouhani was astonished but glad to learn after his election that there were direct talks already going on between the United States and Iran. Three days after his inauguration, he called for the resumption of the P5+1 talks, which had been put on hold during the election campaign in Iran.

Rouhani’s election also lent new energy to the back-channel talks, as did a substantive change in the U.S. government’s position. Ever since 2003, when it became clear that Iran was enriching uranium, Washington had insisted that Iran had to completely cease doing so. The Iranians, meanwhile, had stood on the principle that enriching uranium for civilian uses, as they claimed they were doing, was their right as a sovereign nation and did not violate any treaties. Obama decided to tell the Iranians that he would entertain the possibility of allowing them to enrich a very limited amount of uranium, if the enrichment could be tightly inspected, monitored, and verified—a position already taken by Washington’s European allies.

In practical terms, Obama wasn’t giving away much. The Iranians had already mastered the science of uranium enrichment. They would continue to stockpile enriched uranium whether the United States accepted their right to do so or not. Insisting on a total prohibition of enrichment only frustrated the United States’ European partners and gave Iran the opportunity to cast Washington as the recalcitrant party. The new proposal, on the other hand, would allow the United States to limit Iran’s enrichment while permitting the Iranian regime to claim that it had faced down the world to retain its civil nuclear program and had also won conditional relief from sanctions. Strategically, the Iranians couldn’t say no. Politically, they were given space to say yes.

HANDSHAKE DIPLOMACY

When the P5+1 negotiations resumed that November in Geneva, Switzerland, I felt that it was crucial to create a sense of personal connection in our day-to-day interaction with the Iranians. I had a significant problem, however, in that I still could not shake hands with my counterparts. Conservative Muslims in many cultures are forbidden by custom from physical contact with members of the opposite sex. Such rules don’t evaporate when Iranians leave home. Diplomats and other frequent travelers to the Middle East have developed a workaround: those of us who are barred from shaking hands press our right hands to our chests and give a slight nod. It does the job, although when you’re the only woman in a roomful of men, repeatedly clasping your chest and nodding, you risk looking like part of a Marx Brothers routine.

In this case, however, the gesture provided me with an opening. One day, during a break, I turned the conversation with Araghchi and Takht-Ravanchi toward our inability to shake hands. I explained that I had grown up in a Jewish neighborhood outside Baltimore and that many of my neighbors were strictly observant Orthodox Jews—some of whom, like some conservative Muslims, avoid touching anyone of the opposite sex besides a spouse, child, or parent.

Araghchi and Takht-Ravanchi were at first slightly mortified, but as I continued my story, they began to listen with great interest. They had not known that they shared this custom with Orthodox Jews, and talking about the awkwardness of our greeting transformed its significance. It gave them some insight into my background. They could see me a little more clearly: not just as a representative of the United States, or as an untouchable member of the opposite sex, but as a human being with respect for their cultural norms.

Establishing common ground with the Iranians was especially important because, from a political and even psychological standpoint, the talks had a different resonance for them than they did for the Americans. For one thing, the professional and even personal stakes were much higher for their negotiating team than for ours. If the U.S. team failed to come up with a deal, or if our domestic political opponents called us appeasers or disparaged the eventual agreement as treasonous (as they did and continue to do), our careers would not end and our reputations would probably survive. Our country would face a greater threat, but ordinary Americans wouldn’t feel it immediately in their pocketbooks. The Iranians could count on no such assurances.

Another factor adding to the tension was that the Iranians bridled constantly at being told by representatives of the former colonial powers what kinds of weapons they could have. In 1953, the Americans and the British had organized a coup against Iran’s democratically elected government. They had created client states and spread chaos, in the Iranians’ view, for the sake of cheap oil. At times, the Iranians’ pose of resistance led them to irrational positions. When we offered them relief from sanctions, they claimed that the sanctions weren’t hurting them. It was a preposterous claim, but one that was vital to their self-regard. For them, nearly everyone else at the table represented the Western corruption and arrogance that their revolution had stood against. Bowing to the wishes of these world powers would betray their sense of who they were.

TROUBLE ON THE HOME FRONT

By late November 2013, the parties to the talks had overcome a number of significant disagreements and had arrived at an interim agreement. The P5+1 pledged to pull back a small number of the sanctions that were tying up Iran’s economy, give Iran access to some $7 billion in Iranian funds that had been frozen in foreign banks, and suspend bans on Iran’s auto industry and its trade in airplane parts, so that the country could upgrade its debilitated civilian airliners. In return, Iran would deeply cut its production of enriched uranium and allow international inspectors into its nuclear sites. The plan was designed to build confidence in the Iranians’ willingness and ability to comply with a long-term deal and give the Iranian people a taste of what that deal would mean, while we hammered out the final details.

There was also work to do back home in the United States. Obama’s decision to open up a dialogue with Iran had plenty of detractors, as any assault on the status quo always does. As the final contours of a deal began to take shape, resistance from Congress became the administration’s chief concern. The Iran deal would not be submitted as a treaty, which would require 60 votes to win ratification in the Senate—a nonstarter in a chamber controlled by the GOP. Instead, the deal was classified as an executive action, a prerogative of the president to manage foreign affairs under the power delegated in the Constitution.

In recent years, because of the sheer volume of business with other countries, presidents have come to prefer such agreements over treaties, which tend to be difficult to get through the U.S. Senate. (In 2012, Republicans in the Senate rejected a treaty that would have protected the rights of disabled people all over the world, even after the former Republican senator and presidential candidate Bob Dole took to the Senate floor in his wheelchair to urge its passage.) But the Obama administration had another, more substantive reason for putting the Iran deal forward as an executive agreement. The deal would require constant reviews of Iran’s compliance and had to allow enough flexibility to quickly restore sanctions if Iran didn’t keep its promises. It would have been very difficult to build such flexibility into a formal treaty.

Still, Congress had the ability to override an executive action that lifted sanctions by simply passing new ones. And as the deal grew closer to completion, senators began to make noise about holding a vote to formally approve or disapprove it, which would not only set up troublesome jurisdictional questions but also put the deal itself at risk. Members of both parties had legitimate questions about the deal. (The Republicans, in addition, had political reasons for wanting to see it fall apart.) And as the final framework took shape, opposition to it stiffened sharply. The possibility that we might actually succeed in fleshing out an agreement seemed to energize the Republicans—and the Israelis, who began to act in concert with the GOP to foil our progress.

From the beginning of the Obama administration, Israeli Prime Minister Benjamin Netanyahu had warned that negotiating with Tehran would only give the Iranians more time to build up their nuclear capabilities and had advocated a preventive military strike on Iran’s nuclear facilities. In March 2015, he accepted an invitation from the Republican Speaker of the House, John Boehner, to address a joint session of Congress. Netanyahu used this unprecedented appearance to denounce the deal—and to implicitly push for a party change in the White House.

The speech was the equivalent of throwing a grenade into the negotiations. The Iranian negotiators had grown accustomed to Netanyahu’s hyperbolic rhetoric but were incensed by the fact that the U.S. Congress seemed to be endorsing it. And Netanyahu’s gambit was only the start of a full-court press to reject the deal. A few days later, U.S. Senator Tom Cotton, a Republican from Arkansas, published an open letter addressed to “the leaders of the Islamic Republic of Iran,” informing them that any agreement made without the approval of the U.S. Congress would pertain only as long as Obama was in office. “The next president could revoke such an agreement with the stroke of a pen,” the letter read, “and future Congresses could modify the terms . . . at any time.”

We on the U.S. negotiating team were stunned by the letter, which was cosigned by 46 other GOP senators. None of us could remember a time when Congress had so publicly tried to sandbag the executive branch’s foreign policy efforts. Cotton, a freshman senator who had fought in Iraq, believed that regime change in Iran was the only way to guarantee peace in the Middle East. But he and other prominent critics misunderstood a basic rule of diplomacy: you have to deal with things as they are, not as you wish them to be. Had we thought that we could wait until some hypothetical day when the theocrats in Tehran would be deposed, there would have been no need for a negotiated solution.

Still, a good diplomat never wastes an opportunity, and we managed to use the letter and Netanyahu’s congressional appearance to our advantage. When the Iranians claimed that we were asking for too much and that they could never sell the deal in Tehran, we reminded them that they were not the only ones taking political risks. “Look at this letter, and the joint session of Congress,” we said. “We have problems at home, too.” On July 14, 2015, the JCPOA was formally announced. In the end, a Democratic filibuster prevented the Republicans in the Senate from stopping the implementation of the deal.

Members of Congress led by Nancy Pelosi rally in support of the Iran deal, September 2015. Jonathan Ernst / Reuters

AMERICA WALKS AWAY

By this spring, when it became clear that Trump planned to withdraw the United States from the deal, the economic benefits that Iran had hoped for had yet to fully materialize. The U.S. Congress, angered by Iran’s increasing presence in Iraq and its continued support for Hezbollah and the Assad regime in Syria, understandably kept in place sanctions that had not been lifted as part of the JCPOA. Iran didn’t help itself by making it difficult for companies to enter its domestic markets. Many large companies, including Airbus, Allianz, Boeing, Peugeot, Renault, Siemens, and Total, had begun to work on deals for investment and sales in Iran. But investment from Western-based multinationals was held back by concerns about corruption and the lack of security for foreigners—especially dual nationals, who frequently found themselves targeted for harassment or arrest by Iran’s security services.

Trump’s election exacerbated these challenges, as his administration severely undercut the deal, proposing legislation that would weaken it and refusing to issue licenses for the limited investment U.S. companies could make. These measures only emboldened the hard-liners in Iran, who said they showed that the United States never intended to honor the deal. The president piled on by tweeting his usual invective about the agreement. The truth was that from the U.S. perspective, the deal was working well: the Iranians were complying with the inspections regime and had come up clean in every sweep of their facilities.

In April, I spoke to Zarif about the road ahead. Although he was calm and focused, I knew him well enough to see that, behind his usual smooth delivery, he was concerned about what would happen if Trump withdrew from the deal. The United States was only one of six partners to the agreement, but its economic might made Washington’s participation crucial. Reinstating U.S. sanctions, especially those barring access to U.S. banks for any company doing business with Iran’s central bank, would hollow out the deal. The slim progress Iran had made in garnering foreign investment and trade would likely fizzle altogether.

The most important thing, I told Zarif, was for Iran to continue to comply with the terms of the agreement: no uranium enrichment beyond the parameters agreed to and open doors to the international nuclear inspectors. I next tried to impress on him that dissatisfaction with the deal had much to do with Iran’s meddling in Iraq, Lebanon, Syria, and Yemen—activities that Democrats and Republicans alike saw as destabilizing and dangerous. I acknowledged that the nuclear agreement didn’t cover Iran’s behavior outside its borders, but the administration was nonetheless making Iran’s attempts to disrupt and control the Middle East a phantom term of the deal. I urged Zarif to do what he could to convince his government to lower the temperature (and to send home Americans who had been detained or were missing in Iran).

It was too late. Less than a month later, Trump announced that he was pulling the United States out of the deal. Trump’s policies often seem to follow little logic other than to do the opposite of what Obama did, no matter the circumstance and no matter the consequences. In this sense, his exit from the JCPOA was always a fait accompli. The deal had survived as long as it did thanks only to some of Trump’s early advisers, who understood its value. But they hadn’t lasted long in the chaos of the Trump administration.

With the hawkish John Bolton now driving Iran policy as Trump’s national security adviser and the president seeming to want to ingratiate himself with Israel and Saudi Arabia, the administration appears to have replaced the Iran deal with a threat of violent regime change—a curious decision for a White House that wants to reduce U.S. commitments in Afghanistan and Syria and perhaps remove U.S. troops from the Korean Peninsula. Unless Trump decides to expend American blood and treasure in Iran—a fight that would be difficult to contain to Iran alone—the theocrats in Tehran are almost certain to remain in power, as mistrustful of the United States as ever and now liberated to ignore goodwill efforts to improve the situations in Iraq, Syria, and elsewhere.

Even if Washington’s European allies can hang on to the JCPOA on paper, their corporations will face uncertainty in Tehran and pressure from Washington. Virtually all large companies have already backed away from their ventures in Iran. For the economic development Iran hoped the deal would bring, the regime will now turn to China and Russia. And worst of all, if Iran decides to pull out of the deal and end the inspections of its nuclear facilities, the chances that the country will someday develop nuclear weapons will be vastly increased. As bad as Iran’s current behavior in the region is, a nuclear-armed Iran would be much worse, since it would be able to act more aggressively and deter the United States and its allies from pushing back.

Trump has turned Iran into a nearly impossible problem for future administrations. His behavior has given U.S. allies less reason to trust Washington on future deals or to take U.S. interests into account. He has thrown away a hard-nosed nuclear deal that set a new standard for verification, and he punched a hole in a highly effective web of sanctions and international consensus that made the Iran deal—and future deals like it—possible.

The JCPOA represents the state of the art of professional multilateral diplomacy. As Trump is now finding out through his difficulties in pinning down a deal with North Korea, verifiable nuclear agreements backed by U.S. allies and adversaries are hard to come by. With every threat Trump tweets and every list of empty promises his administration releases, the Iran deal looks better and better.