Mohamad Bazzi (@BazziNYU), a Lebanese-American journalist, is the former Middle East bureau chief for Newsday. He is currently teaching journalism at New York University, and writing a book on the proxy wars between Saudi Arabia and Iran.

In early July, as his negotiators were working around the clock in Vienna to reach an agreement with world powers on limiting Iran’s nuclear program, Iranian President Hassan Rouhani was back in Tehran recalling an event that happened nearly 1,400 years ago. In a speech, Rouhani invoked the historic compromise made in the year 661 by his namesake, Imam Hassan, Shiism’s second imam, to step down and prevent a new war between the then-emerging Sunni and Shiite sects. “Imam Hassan made an important decision during difficult circumstances that could have destroyed the Muslim community," Rouhani said, "and led to a long period of bloodshed.”

Rouhani wasn’t alone in citing Imam Hassan's legacy. The supreme leader, Ayatollah Ali Khamenei —who has final say in all political and national security matters—also began to invoke the imam in setting the stage for Tuesday’s compromise, calling it a policy of “heroic flexibility.” By repeating this term several times, Khamenei reached back into Shiite history to offer theological rationales for the prospect of a rapprochement with Iran’s Western adversaries.

Story Continued Below

It is striking that, throughout the past 12 years of on-and-off negotiations with the West over Tehran’s nuclear program, Iranian leaders have used references to Imam Hassan and his younger brother Imam Hussein—and the two historical models for settling conflicts that these figures represent—to signal their intentions, both hardline and soft, and provide theological justifications for their actions. Hassan’s path emphasizes compromise (or, to its hardline critics, accommodation), while Hussein chose rebellion and martyrdom. These two trends defined Shiite history—and they are an important part of the religious and ideological debates within the Iranian regime.

Iranian leaders struggled with the two models, and how they should apply to the Islamic Republic’s foreign policy, since Saddam Hussein invaded Iran in 1980, instigating the devastating, eight year Iran-Iraq war. Back then it was the hawkish imam who was cited. By the mid-1980s, after five years of war and international isolation, the Iranian economy was reeling. In 1979, the first year after the Islamic Revolution, Iran’s oil revenue was about $23 billion; by 1986, it had dropped to a record low of $6.2 billion. The revolution’s hardline leader, Ayatollah Ruhollah Khomeini, was under pressure by some of his advisers to accept a United Nations-brokered ceasefire, partly to avert an economic disaster. For several years, Khomeini refused to budge, choosing the example of Hussein. In 1986, he dismissed Hassan’s compromise, saying: “Peace was imposed on Imam Hassan, but we should not accept the same agreement.”

But as the economic crisis became more dire, some of Khomeini’s advisers reframed the argument, noting that the choice was between preserving the Islamic Republic or prolonging the revolution: the Iran-Iraq conflict was threatening the viability of the Iranian system. As hardliners and moderates around Khomeini debated the paths of Hassan and Hussein, Akbar Hashemi Rafsanjani, who was then speaker of the Iranian Parliament (and later became president), championed a compromise based on the models of both imams: a series of military victories that would be followed by a political settlement. Rafsanjani and his allies, who at the time included Rouhani, promoted the idea that while the path of martyrdom set by Hussein required courage, so did the model of peace chosen by Hassan.

In the end, after eight years of mobilizing Iranians with religious fervor and intense nationalist rhetoric, Khomeini accepted the ceasefire, saying he had been forced “to drink from a poisoned chalice.”

Today—after Iran, the United States and five other world powers reached an agreement to limit Tehran’s nuclear program for more than a decade in return for lifting international sanctions—Khomeini’s successor as supreme leader, Khamenei, can claim to have emulated Imam Hassan’s path of compromise. He’s chosen pragmatic politics over revolutionary ideals as his legacy.

***

So who was Imam Hassan, the cleric whose spirit appears to infuse the new rapprochement between Iran and the West? The origins of the Shiite-Sunni conflict go back to the period after the Prophet Muhammad’s death in 632. A schism arose over who would succeed him as caliph, the political and military leader of Islam. One faction argued that the prophet’s heir should be chosen from among his closest companions. The other faction insisted that succession must preserve the prophet’s bloodline, and since Muhammad did not have any surviving sons when he died, his rightful heir was his cousin and son-in-law, Ali. The Shi’at, or Partisans, of Ali emerged out of this movement. The struggle over the caliphate led to the first fitna, or civil war, between Muslims—a term (also meaning sedition) that is still invoked today to warn of sectarian divisions.

The prophet’s followers convened a shura, or consultation, to choose his successor. They passed over Ali and chose one of Muhammad’s companions instead. Ali was passed over twice more, until finally becoming the fourth caliph of Islam in 656. He was assassinated five years later, in the ongoing struggle over who would rule the faithful. The mantle of leadership of the Shiite community then passed to Ali’s eldest son, Hassan. His supporters urged him to lay claim to the caliphate established by a rival leader, Muawiyah, whom Shiites regarded as a usurper.