From Obama’s perspective, the war in Iraq and the U.S.’s over-commitment in the Middle East had served only to weaken the country and undermine its ability to meet the challenge of prospective peer-competitors. With the Middle East losing strategic significance as a result of a variety of factors — including reduced U.S. dependence on oil — and with the cost of U.S. hegemony drastically increasing, the cost-benefit calculation for the U.S. had decisively shifted. To Obama, the Middle East was unsalvageable, and the more the U.S. got involved, the worse things would get and the more the U.S. would be blamed for the region’s woes. If Libya showed Obama that the region was best avoided, the rise of the Islamic State proved to him that the region could not be fixed. “Contrast that with Southeast Asia, which still has huge problems — enormous poverty, corruption — but is filled with striving, ambitious, energetic people who are every single day scratching and clawing to build businesses and get education and find jobs and build infrastructure,” Obama told The Atlantic. “If we’re not talking to them,” he continued, referring to young people in Asia and elsewhere, “because the only thing we’re doing is figuring out how to destroy or cordon off or control the malicious, nihilistic, violent parts of humanity, then we’re missing the boat.”

Not only did Obama doubt the efficiency of military action, it also went against his principles and promises to pursue war only after all other options were exhausted. In never considering acceptance of enrichment on Iranian soil, the U.S. had not tested all diplomatic solutions. War also contradicted Obama’s larger geopolitical objectives to reduce the U.S.’s footprint in the Middle East and shift its focus east toward Asia and China. Although the Obama administration has insisted that the nuclear deal was solely about nonproliferation, its commitment to the deal in spite of the overwhelming domestic political risks — Congress seemed implacably opposed to diplomacy — can best be understood in the larger geopolitical context of the nuclear talks. The real challenge to the U.S. was the emergence of a peer-competitor with capacity and ambition to be a global superpower. No state in the Middle East has the capacity or the potential capacity to challenge the U.S. on a global scale. China, on the other hand, does.

Herein lies the tragedy of Netanyahu’s miscalculation. By aggressively defining the Iranian nuclear program as an existential threat to Israel, depicting the Iranians as irrational and suicidal, and threatening to bomb Iran, Netanyahu hoped to force Obama to take military action and recommit Washington to Pax Americana. Instead, Netanyahu’s strategy eliminated the status quo option of containing the nuclear program while neither resolving the issue nor acquiescing to Iran’s nuclear demands. Then, once that option was rejected, Obama did something Netanyahu had discounted: He opted for diplomacy, a measure that by definition could open the door to ending the U.S.’s efforts to isolate Iran.

The closed meeting, organized by a prominent U.S. university and held in a small Western European country, revealed dynamics driving the conflict that are rarely discussed in public: The Israeli fear that Iran’s rise in the region would be accepted by the U.S., and that it would regard Tehran as a legitimate player in the new regional order without Tehran accepting Israel’s existence. The most potent instrument for ensuring that Washington wouldn’t come to terms with Iran was the nuclear issue, which before the breakthrough in November 2013, was viewed as a hopelessly intractable conflict. “As long as the deadlock held, Iran would remain at least a permanently sanctioned pariah,” former Israeli official Daniel Levy wrote. For the years when the U.S. pursued Iran’s all-out containment, Israel “enjoyed a degree of unchallenged regional hegemony, freedom of military action, and diplomatic cover that it is understandably reluctant to concede or even recalibrate.” Israel’s position was directly linked to the U.S. upholding Pax Americana in the Middle East; its status was “underwritten by U.S. preeminence in the region,” Levy argued.

It was April 2012. Tensions between Israel and the Obama administration were rising. President Barack Obama was pushing back against Israeli pressure for military attacks against Iran, while at the same time continuing the P5+1 diplomacy with Iran, an internationalized process involving the permanent U.N. Security Council members, as well as Germany and the European Union. There were also only a few months left before the 2012 U.S. presidential election. Many Israelis worried that Netanyahu’s aggressive style would further damage his relationship with Obama and undermine Israel’s influence over American calculations regarding Iran. It was becoming a growing worry for the Israelis as Obama showcased unprecedented dedication to diplomacy, which they suspected would only grow more firm in his second term.

“Enrichment is not important,” the ex-Israeli official continued. “What Israel needs to see from Iran is a sweeping attitude change.” The veteran Israeli decision-maker — himself a vocal opponent of Prime Minister Benjamin Netanyahu — explained that Israel could not accept the U.S. coming to terms with Iran without demanding that Iran come to terms with Israel. “Israel is not party to the deal, so it won’t be bound by the deal,” he warned. If Iran is not willing to accept Israel’s existence, then Israel will stand in the way of the U.S. reaching a deal with Iran, the Israeli message read. The Iranians in the room listened attentively, but showed no reaction. In a breakout session later that afternoon, they indicated that they could recognize Israel only if Israel joined the Non-Proliferation Treaty as a non-weapons country — that is, once Israel gave up its nuclear weapons and opened its nuclear program to international inspectors.

“This was never about enrichment.” The academics and officials in the room were taken aback. For a former senior Israeli official to deny the importance of the nuclear issue was unusual, to say the least. The conversations, attended by American civilian and military officials and other Western representatives, as well as Iranian diplomats and Tehran’s then-nuclear negotiators, were shockingly honest.

Obama’s critics contended that his lack of involvement was the cause of many of the problems in the Middle East, which in turn had weakened the U.S. On the contrary, Obama believed that the U.S.’s overextension in the region had and would continue to harm its strength and global standing. “Overextension in the Middle East will ultimately harm our economy, harm our ability to look for other opportunities and to deal with other challenges, and, most important, endanger the lives of American service members for reasons that are not in the direct American national-security interest,” Deputy National Security Adviser Ben Rhodes explained.

In addition, Obama harbored a growing conviction that Iran’s prolonged isolation was neither possible nor necessarily helpful. This was particularly true if Iran’s reaction to its containment was to further challenge Western interests in the region. “Iran is too large a player, too important a player in this region, to simply leave in isolation,” the United Kingdom’s then-Foreign Secretary Phil Hammond said. This sentiment was widely held in Europe. “No one believes Iran can perpetually be put in a straightjacket,” Germany’s Ambassador to the U.S. Peter Wittig told me.

Obama believed giving Iran a seat at the table could help stabilize the region, particularly in Syria and Iraq, where the West and Iran shared an interest in defeating ISIS. “There’s no way to resolve Syria without Iran being involved,” Obama said a few weeks after the Iran deal, known formally as the Joint Comprehensive Plan of Action, had been reached. Syria had been discussed on the sidelines of the nuclear talks, but it was only after the deal had been finalized that real deliberations could take place. “I really believe that, for instance, what we have now on Syria — talks bringing together all the different actors, and we have it now and not last year because we had the deal,” EU foreign policy chief Federica Mogherini told me. Meanwhile, the United States and Iran indirectly coordinated their efforts against ISIS in Iraq, prompting Obama’s Secretary of State Kerry to tell an American audience that Iran had been “helpful.” Neither that collaboration — nor the public acknowledgment of Iran’s help — would have occurred had it not been for the nuclear deal.

Obama’s interaction with Iran convinced him that the leaders in Tehran were rational, self-interested, and pragmatic. “What we’ve seen, at least since 1979,” Obama said in August 2015, “is Iran making constant, calculated decisions that allow it to preserve the regime, to expand their influence where they can, to be opportunistic, to create what they view as hedges against potential Israeli attack, in the form of Hezbollah and other proxies in the region.” Reducing tensions with Tehran was particularly attractive in view of both the negative role some of the U.S.’s key Middle East allies played and their insistence that Washington fight their battles. American frustration with Saudi Arabia was particularly noteworthy. Obama had a strained relationship with the Saudi royal family, often finding himself aggrieved with the Saudis and with the idea that the United States had to treat Riyadh as an ally at all. His understanding of Saudi Arabia’s role in exporting extreme Wahhabist Islam may go well beyond that of any previous and future presidents. During his youth in Indonesia, according to The Atlantic, Obama observed firsthand how Saudi-funded Wahhabists gradually moved the country closer to their own vision of Islam. The U.S.’s problems with Iran ran deep but, in the president’s mind, it was not in American interests to always unquestionably side with Saudi Arabia.

Ultimately, the United States sought to reduce its tensions with Iran and pave the way for a pivot to Asia. By contrast, it seemed that Saudi Arabia sought a return to the pre-2003 order and an intensification of Iran’s isolation and exclusion from regional affairs. It was fundamentally clear that Riyadh and Washington were on a “collision course,” a former Saudi official said. The official, Nawaf Obaid, defined Iran as the root of regional chaos, whereas Obama viewed the rivalry between Saudi Arabia and Iran as a source of instability for the region. Yet from the Saudi point of view, American neutrality was tantamount to betrayal. To Riyadh, Obama was abandoning the entire Arab world and acting on behalf of Tehran by pursuing a policy that “declared support for a more powerful Iran,” Obaid wrote. The Saudis saw proof of this view when they refused to attend the Syrian crisis talks since Iran would partake for the first time, and Obama personally intervened. According to Foreign Policy, he called the Saudi king to convince him to participate in the negotiations and drop the request for Iran to be shut out. Obama appealed to Saudi Arabia to find a way to “share the region with Iran.” His reasoning — that the problem was not Iran’s alleged aspiration for hegemony, but rather Riyadh’s refusal to accept Iran’s inclusion into the region — was “patently absurd,” according to Obaid.

From the American perspective, however, the nuclear deal prevented both war with Iran and a nuclear-armed Iran while holding out a promise of improved relations. At the same time, the U.S. could exercise tougher love with Israel and a more conditional friendship with Saudi Arabia. “We need to re-examine all of the relationships we enjoy in the region, relationships primarily with Sunni-dominated nations,” Gen. Mike Mullen wrote in support of the nuclear deal as Congress debated it. “Detente with Iran might better balance our efforts across the sectarian divide.” The U.S. was frozen in a pattern of regional relations that were no longer productive and could force it into unnecessary wars. To pivot to Asia, these patterns needed to be broken, starting with a new relationship with Iran. Conversely, to prevent the U.S. reorienting itself, the nuclear deal needed to be killed — hence Saudi Arabia and Israel’s staunch opposition to it.

While U.S. and Saudi interests were diverging, Riyadh found itself viewing the region in an increasingly similar light as the Israelis. Once clearly taboo, collaboration with Israel was increasingly discussed in the Saudi kingdom. For both countries, Obama’s deal largely resolved the immediate matter of the nuclear question. However, it did so by undermining their mutual core interest in excluding Iran from the regional order. The JCPOA addressed the pretext for Israel and Saudi’s tensions with Iran, but not the roots of their conflict. “By framing the nuclear issue as an ‘existential threat,’ Netanyahu enabled the sidestepping of broader worries that both Arabs and Israelis have about Iran,” Brookings Institute analyst Shibley Telhami wrote in 2015. After all, an existential threat supersedes all other issues; all else became secondary at best. In fact, the Saudis and their allies asked the U.S. not to discuss their top regional concerns with the Iranians in the U.S.’s bilateral meetings with Iran. Israel did the same, securing a promise from the United States and the European Union that “that a total separation will be enforced” between the nuclear file and other issues such as ISIS, the Israeli government minister responsible for the Iran file at the time, Yuval Steinitz, said. Later, both Saudi Arabia and Israel pointed to this division as a weakness of the JCPOA.

The most important implication of the Iran deal, according to Israel, was that it condoned, as Harvard researcher Daniel Sobelman put it, “Iran’s drive to obtain recognition as a legitimate regional power to be reckoned with.” Moreover, rather than downgrading Iran, the deal upgraded it to “a de-facto threshold nuclear power,” according to Netanyahu’s former defense minister, Ehud Barak. With the nuclear issue resolved, the U.S. would lose interest in countering Iran’s destabilizing activities in the region, leaving Israel and the Arabs to manage their rivalry with Iran on their own. Israel’s singular focus on keeping Iran isolated and constrained also caused tensions with the United States over the struggle against ISIS. To Israel, ISIS was a distraction. “ISIL is a five-year problem,” Steinitz, the Israeli minister, said, while the struggle against Iran would continue for another generation. Israeli Defense Minister Moshe Yaalon publicly rejected that ISIS constituted a threat to Israel, and stated that he preferred ISIS to Iran. The head of a well-connected Israeli think tank even went so far as to write that destroying ISIS would be a “strategic mistake” because the group “can be a useful tool in undermining Tehran’s ambitious plan for domination of the Middle East.” The argument underscored the depth of the divergence of interest and perspective between the U.S. and Israel.

While some have suggested that the nuclear deal caused a rift in U.S.-Israeli relations, in reality the geopolitical interests of the two nations had already been diverging for some time. Rather than causing this rift, the deal reflected a preexisting, growing gap between them. “There’s no doubt that there’s a divergence of interest between the United States and Israel,” a senior administration official told me, asking for anonymity. Differences over the Israeli-Palestinian peace process, the Arab Spring, including Iran in the regional order, and the U.S.’s military footprint in the Middle East were all coming to a head. While Israel wanted the U.S. to retain a strong military presence in the region, America’s global responsibilities prevented the Middle East from occupying such a large share of its resources. While the U.S. continues to have an interest in keeping Israel safe and democratic, it is concerned that the biggest threats to Israeli democracy come from inside the country itself — specifically, its ongoing occupation of Palestinian territory. Even senior members of the Israeli security establishment agree that the real existential threat to Israel comes from the inside, and not from Iran. “There is no outside existential threat to Israel, the only real existential threat is the internal division,” former Mossad chief Tamir Pardo said. “Internal division can lead us to civil war — we are already on a path towards that.”

Israel’s security establishment repeatedly entered into Iran debates as Netanyahu’s biggest critics. Some of the security officials expressed alarm at the damage to U.S.-Israeli relations his vendetta with Obama and his opposition to the Iran deal was causing. “Instead of fighting Iran, he’s fighting the U.S. Instead of Israel working with its closest ally, he’s turned them into an enemy. Does that seem logical to you?” former Mossad chief Meir Dagan remarked to prominent Israeli journalist Ilana Dayan. Netanyahu had the choice of shifting his position on negotiations with Iran once Obama had made clear that the U.S. would not look at any other options until it had first exhausted diplomacy. By supporting diplomacy, Israel would arguably have had a greater ability to impact the talks and shape the outcome. Instead, Netanyahu chose to declare war on diplomacy and go after Obama. “Once the negotiations had started, Israel should have put itself in a position that would have enabled it to have a continuous dialogue [with Obama] on the positions of the United States in the negotiations,” retired Israeli official Shlomo Brom complained.

The great irony is that there was a much easier way for Netanyahu to kill the nuclear deal than by taking on the president of the U.S. Negotiations could have been seriously harmed had he embraced the deal and argued that Iran had been defeated through it. The Iranians had no problems handling Netanyahu’s opposition to the nuclear talks — on the contrary, they welcomed it. But it would have been very challenging for them politically, particularly for the nuclear negotiators, if Netanyahu had gone on a victory lap and declared the deal a defeat for Iran. Iran’s Foreign Minister Javad Zarif, admitted as much to me: “That would have been enough to kill the deal.”

Adapted from the new book by Trita Parsi, “Losing an Enemy: Obama, Iran and the Triumph of Diplomacy.”