Everyone is happy with the interim agreement reached with Iran in Geneva on November 23 -- that is, everyone who really wants to defuse the tensions over Iran’s nuclear research program. The chief executives in both Tehran and Washington are all smiles, with Hassan Rouhani stressing the moderate sanctions relief he achieved 99 days into his presidency and Barack Obama boasting of blocking “Iran’s most likely paths to a bomb.” The respective chanceries are also pleased, with Iranian Foreign Minister Mohammad Javad Zarif pointing to “two distinct places” where the Geneva text implicitly recognizes Iran’s right to enrich uranium and Secretary of State John Kerry claiming the deal as proof that the coercive diplomacy of sanctions paved the way for negotiations. Cheering crowds welcomed Zarif home from Switzerland at the Tehran airport, while ex-US official Zbigniew Brzezinski tweeted that Obama and Kerry are the “best policy team” since George H. W. Bush and James Baker. Russia and China signed on, too. Oil prices fell. Stock markets rose, even in Israel.

The Israeli government, naturally, does not share in the optimism. “A historic mistake,” said Prime Minister Benjamin Netanyahu of the accord. Pro-Israel commentators in Washington quickly condemned the Geneva agreement as “a defeat for the United States and the West” and “a deceptively pleasant way station on the long and bloody road that is the American retreat from the Middle East.” Pro-Israel members of Congress scurried from both sides of the aisle to concur. The thaw in US-Iranian relations certainly is a defeat for Netanyahu and the pro-Israel lobby, both of whom have worked assiduously for several years to push the White House toward mounting military strikes on Iranian nuclear facilities.

The House of Saud and other ruling families on the Arab side of the Gulf, always eager to stoke American belligerence toward the Islamic Republic, are fuming over the Obama-Kerry tilt toward détente. Their concerns are complicated: fear of Iranian power, loathing of Shi‘i Islam, anxiety over the notion of an “Islamic republic” next door. They may also perceive a long-term threat to Saudi Arabia’s prized role as the “swing producer” of crude oil as sanctions are eased and Iranian petroleum finds additional buyers. The Gulf monarchs and their Western lobbyists expect some measure of gratitude for the $10.8 billion in “advanced standoff weapons” sold by Boeing and Raytheon to the Saudis and the Emiratis in late October. Instead, the White House enters a parley with the Persian peril.

But the hero of this story is neither an individual statesman nor a newfound will in Washington to test the two “special relationships” in the Middle East. What brought about the deal in Geneva was people power, in Iran, in the West and, somewhat paradoxically, in the Arab world.

For nearly a decade, Iran has doggedly advanced its nuclear research program according to a dual logic. In late 2004, President Mohammad Khatami and his nuclear negotiator Rouhani agreed to the voluntary suspension of uranium enrichment as a confidence-building measure. This compromise had the explicit support of the Leader, Ayatollah Ali Khamenei. But the regime change talk of the Bush administration, coupled with the persistent political appeal of Khatami’s reformers, convinced Khamenei and his power base in the senior clergy and security apparatus that the Islamic Republic faced not one, but two existential threats. A hard line on enrichment, the Leader’s circles decided, was a means of deterring both popular revolt and foreign aggression. They felt affirmed in this judgment by the rise of Mahmoud Ahmadinejad to the presidency, which seemed to banish the reformers to the wilderness, and by the increase in the number of Iranian centrifuges from 3,000 to 19,000.

But the Leader’s cohort would soon be haunted again by the specter of social discontent. It was not just the shenanigans employed to return Ahmadinejad in 2009 and the subsequent repression of the reform-oriented Green Movement. After the 2009 election, the hardline conservatives around Ahmadinejad -- who live off isolation and international conflict -- tried to monopolize power for the first time in the Islamic Republic’s history. These “principlists,” with their origins in militias and other popular revolutionary organizations, distrust Khamenei and the old conservative elite nearly as much as they do reformist clerics and secularists. In a brazen attempt to buy the favor of the masses, they splurged on public expenditures. In the grip of such erratic, amateurish populism, the Ahmadinejad government managed to exacerbate inflation and unemployment despite the inflow of unprecedented oil revenues. Ordinary Iranians found themselves significantly poorer as a result of these policies and the impact of international sanctions. Meanwhile, hardly a day went by without the revelation of some new financial scandal as Ahmadinejad’s cronies enriched themselves in the sanctions-enhanced black market. As the June 2013 presidential election approached, society was split into skirmishing factions to an extent unseen since the immediate aftermath of the Islamic Revolution. A ferocious rivalry was emerging among the hardliners themselves.

The election became a moment of truth for Khamenei and his allies: Proceed along the path to unvarnished authoritarianism or pause to reconnoiter? They opted for a bit of both. The clerics in the Guardian Council arbitrarily disqualified several candidates, including Akbar Hashemi-Rafsanjani, the former president, from the race. But they did not simply clear the field for another hardliner. In Rouhani, perhaps, they saw a compromise figure, someone acceptable to the old-guard conservatives, but whose mandate clearly came from the reformist sectors of the electorate. For his part, Rouhani relaxed several of his positions in reply to pointed questions from women, ethnic minorities, reformists and Iranians weary of the country’s near-pariah status. In a televised candidates’ forum on June 7, he contrasted his willingness to give and take on the nuclear front with the intransigence of the Ahmadinejad years. Since his main opponent, Saeed Jalili, held the nuclear file for Ahmadinejad, Rouhani could draw a bright line indeed.

In the end, encouraged by the vigorous debates and Rouhani’s responsiveness, Iranian voters shook off the apathy born of their bitter experience in 2009. On June 14, 72.7 percent of the electorate trooped to the polls, where 50.7 percent of voters checked the box for Rouhani and the remainder scattered their ballots among a number of other hopefuls. Hamid Reza Jalaeipour, a Tehran University sociologist, called the high participation rate an “electoral uprising.” Yes, for the first time since Khatami`s victories, the stars of reformist and old-line conservative factions had publicly aligned behind a single candidate. Yes, Khamenei and the clergy allowed the votes to be counted. But, ultimately, it was the people who spoke: Iranians chose pragmatism over truculent nationalism, engagement with the world over the hardliners’ mantra that the Great Satan never sleeps.

In the West, the usual Beltway bombardiers aside, war fatigue is the order of the day. The misadventures in Iraq and Afghanistan are not thought of fondly. In August, British Prime Minister David Cameron failed to persuade even his own party’s backbenchers to endorse “limited, narrow” military intervention in Syria. Obama’s rather desultory effort to drum up support for such action also met with a distinct lack of enthusiasm. In general, according to Pew Research Center findings from mid-2013, 83 percent of Americans want the president to focus on domestic politics, while only 6 percent think he should pay more attention to foreign affairs and only 12 percent consider both equally important. Compare these numbers to mid-2007, when the Pew percentages were 39, 40 and 21, respectively, and when the “surge” in Iraq was six months old. It is very unfortunate that the arbiters of public opinion tend to cast such polls as barometers of “isolationist sentiment.” When the pollsters ask more sophisticated questions, Americans give more sophisticated answers. A Reuters/Ipsos poll, for instance, found that 44 percent of Americans back the Geneva deal (with 22 percent opposing) and that only 20 percent would go to war with Iran if the agreement falls apart.

Still another backdrop to the handshakes in Geneva is the regional turmoil following the Arab uprisings. For decades, the United States has sought “stability” in the Middle East to ensure the regulated outward flow of oil to the world economy and to prevent a rival power or combination of powers from gaining a foothold in the Persian Gulf. The Shah of Iran was once a local guarantor of that “stability”; since his fall in 1979, the Saudi royal family has stood at the head of a host of Arab potentates and presidents-for-life who have kept the oil spigots open, the shipping lanes unobstructed and another multi-front Arab-Israeli war in abeyance. The State Department dutifully noted the closed political systems and endemic human rights violations that undergirded this regional order, but rarely did such cavils impede the traffic in arms and other aid headed for US-allied Arab capitals. The Egyptian army profited especially handsomely. Meanwhile, the Arab regimes lined up beside the US (and, tacitly, Israel) in the successive battles against communism, revolutionary Iran, Saddam Hussein and Hizballah.

The post-1979 “stability” was not stasis, and keeping it stable was a series of exercises in crisis management. From the Reagan years through the first administration of the junior Bush, the US moved in fits and starts toward embracing the thesis that the solution to instability was active destabilization of its enemies. In the Persian Gulf, this postulate meant aiding both Iran and Iraq in their horrific eight-year war; booting Saddam’s armies out of Kuwait; maintaining devastating economic sanctions on Iraq for 13 years afterward; and enforcing the “dual containment” of both Iran and Iraq vis-à-vis the Gulf Arab monarchies. President George W. Bush took the logic furthest by invading Iraq and including Iran in an “axis of evil” he hinted was targeted for termination. The neo-conservative era brought nothing like “stability,” of course, instead illustrating the limits of US military might and unleashing a virulent sectarian animus in the vicinity. Bush exited office with most of the US foreign policy establishment lamenting that he had succeeded only in emboldening Iran in its counter-hegemonic ambitions.

President Obama campaigned on outreach to Iran, but his follow-through was weak, displaying the continued influence of Reagan-Clinton-Bush thinking. He spurned the Brazilian-Turkish initiative of 2010 that might have persuaded Tehran to halt enrichment then. Mostly, he seemed content to undo his predecessor’s damage to “stability” by withdrawing US soldiers from Iraq.

But after the Tunisian people overthrew Zine El Abidine Ben Ali US strategists were compelled to consider the possibility that it was “stability” itself that was not so stable. The ouster of Husni Mubarak in 18 days, the spread of revolt to Bahrain, Libya and Yemen, the descent of Syria into civil war -- this headlong rush of events left a sense of vertigo, a loss of balance that could not be restored by the time-honored means. The experience of “leading from behind” to get rid of Muammar Qaddafi did not calm the jangled nerves. Libya spiraled into chaos, but more to the point, it was peripheral to the areas of Washington’s deepest angst.

It took time for the disorientation to wear off. Whether riddled with dissension, paralyzed by doubt or steeped in cynicism, the Obama administration sat by and watched the Saudi-led counter-revolution in the name of “stability.” The Saudis mounted an incursion into Bahrain to quell the rebellion there. The Gulf Cooperation Council brokered a regime-saving bargain in Yemen even as salafis and jihadis backed by rogue Saudi patrons wreaked havoc. In Egypt, the Saudis quietly conspired with the deep state to discredit popular sovereignty and negate the outcome of elections. The Gulf Arab royals’ hostility toward participatory politics is matched by their enmity for Iran. So, in both Bahrain and Yemen, they are determined to brand aspirations for social justice as Iranian-inspired religious fanaticism. And so, in Syria, along with the Qataris, the Saudis handed out bags of cash to neighborhood toughs who would found militias calling for jihad, thereby fueling the war against the regime, an Iranian ally, but also sharpening many Syrians’ fear of the alternatives. Thus did the Saudis poke Iran in the eye and help to smother the genuinely pluralist, democratic voices in the Syrian opposition.

More and more, however, it sank in to US strategists’ minds that the counter-revolution cannot restore the status quo ante. To the contrary, either the counter-revolution has provoked recurrent intifada, as in Egypt, and to some degree, Bahrain, or it threatens social collapse, as in Syria. The agony of Syria is particularly worrisome, from a geopolitical vantage, because it could end in the redrawing of post-World War I borders or permanent population transfer that would shake the foundations of US-allied regimes in Jordan and Iraq. Keeping Iran out of Syria diplomacy, meanwhile, has probably prolonged the bloodshed: It has strengthened the hand of the Gulf monarchies and their jihadi proxies, while giving Iran every incentive to intercede on behalf of the regime.

The Israelis, the Saudis and their mouthpieces say over and over again that the biggest danger to “stability” in the Middle East is the Iranian nuclear program. Sometimes the Obama administration appears to share this inflated risk assessment; sometimes it does not. But the course of the Arab revolts has given Obama and Kerry new reason to think, perhaps like the elder Bush, that “it wouldn’t be prudent” to take marching orders from Bibi and Prince Bandar. When measured against the tactical approaches of the last 30 years, the Geneva bargain is indeed a major departure in US policy, but it is not the reckless leap its detractors present it to be. For when measured against the goals of US grand strategy since World War II, the enrichment accord looks like a calculated move to preserve the American upper hand by giving the Islamic Republic, at long last, a reason to define “stability” rather as the US does.

Back in Iran, the regional tumult also pushed the state toward a careful rapprochement with the West. The Islamic Republic is afraid of permanent international isolation if its closest friend, the Syrian regime, is decimated by the civil war and the highly sectarian Sunni militias in the opposition continue to flex their muscles. Saying yes at the nuclear talks in Geneva opens the door -- albeit still a crack -- to Iranian participation in the upcoming talks, in the same Swiss city, about a political solution that could grant the Syrian regime some respite. Iran sees equal need to be a counterweight to Sunni sectarianism in Iraq and Afghanistan, and the overstretched US, solicitous of the Maliki government in Baghdad and annoyed with the Karzai government in Kabul, may come to agree. The back-channel US-Iranian discussions hosted by Oman since March lend credence to the idea that the two states discern a convergence of interests. Notably, these talks began a full three months before Rouhani was elected. Meanwhile, shared concern with the Kurdish issue has jump-started Iranian discussions with Turkey.

Yet Iran will not assume a seat at the various multilateral tables without continued progress toward resolving the nuclear impasse. The Geneva agreement is preliminary, and spats have already occurred over the clauses on enrichment, in particular. Hawks in Congress demand more sanctions on Iran, and Israel splutters on, while hardliners in the Iranian press highlight Obama and Kerry’s repeated statements that the “core sanctions architecture” remains intact. But both sides have invested substantial political capital in the agreement’s success -- and President Rouhani, though perhaps not his American counterpart, is bolstered by Israel’s fulminations. If cool heads prevail, therefore, and the détente does not dissolve, the stage will be set for a grand confrontation over nothing less than the place of Iran in the regional and global order. The peoples of the Middle East, though they may otherwise benefit little from the elites’ recalibration of “stability,” may thus at least have spared themselves another calamitous war.