Iraqi Shia cleric Moqtada al-Sadr during his visit to BaghdadThaier Al-Sudani / Reuters

The sectarian fervor widely associated with the Middle East has recent roots. A chain of political and religious upheavals, beginning in 1979, ignited and fueled sectarian hatred and added an ethnic bent to it. The results were catastrophic: Sectarianism caused deep societal fissures and cost hundreds of thousands of lives over a sustained period of time.

Almost exactly 40 years after this surge in sectarianism began, however, we might finally be witnessing its ebb. Sectarianism today is arguably at a recent low, and a reversal of the main causes that catalyzed and intensified it suggests that the demobilization might continue.

In 1979, the religious and geopolitical landscape was drastically transformed. In February of that year, the Pahlavi dynasty of Iran was overthrown by a popular uprising led by a Shiite religious cleric, Ayatollah Ruhollah Khomeini. Later in July, Saddam Hussein formally became Iraq’s president, and he consolidated power after a major purge of the Ba’ath Party. In November, messianic hard-liners hijacked the Grand Mosque in Mecca, Islam’s holiest site, and declared the brother-in-law of their leader Juhayman al-Otaybi as the Mahdi—the Muslim savior—and thus the only legitimate leader. In December, the Soviets invaded Afghanistan, prompting Saudi Arabia, Egypt, and Pakistan to back the mujahideen to expel the invaders of the Muslim country.

On a popular level, none of those events were immediately received in sectarian terms. Sunni groups like the Muslim Brotherhood, for example, congratulated the Shiite cleric and were even inspired by his successful establishment of an Islamic republic. The jihad in Afghanistan also focused energy on what Muslims across the region regarded as an atheist enemy threatening to uproot Islam there. But that reality would be changed, largely by one intellectual and two powerful Arab regimes.

The intellectual in question was Mohamed Surour, a Syrian math teacher who moved to Saudi Arabia in the early 1980s. A former senior member of the Muslim Brotherhood, he grew disillusioned with his organization and became influenced by the fundamentalist brand of Salafism officially practiced in Saudi Arabia. Surour was arguably the most influential religious theoretician since Sayyid Qutb, who is often dubbed as the father of modern jihadism. His legacy, of combining ideas from political Islam with Salafism, was part of a broader movement that led to the creation of the so-called Salafi-Jihadism. Two years after the Iranian revolution, he authored a book under a pseudonym titled The Turn of the Magus Has Come, a reference to the ancient Persian adherents of a religion linked to Zarathustra. The book’s core thesis is that the Shia in general, and the Iranian Shia in particular, take part in a Persian conspiracy to revive an ancient empire destroyed by Muslim conquerors in the seventh century.

Surour’s thesis was an ethno-sectarian take on Shia, which aligned with that of Saudi Arabia and Saddam Hussein’s Iraq. The two powerful Arab countries feared a revolutionary tsunami that would galvanize portions of their populations. Saudi Arabia had a sizable Shia population, concentrated in the oil-rich eastern region, and Iraq was majority Shia. In addition to the Shia threat, Saudi Arabia was already facing a growing Sunni religious movement at home, known as the Islamic Awakening, or Sahwa. Surour and his followers formed a notable part of the Sahwa movement. The book then became a key text in propagating the idea that the Iranian revolution was a doctrinal threat to Sunnis, a Trojan horse to revive the Persian empire. It received semiofficial backing by Saudi Arabia and Iraq, among others. In an interview before his death two years ago, Surour acknowledged that the text was utilized by these countries despite the fact that Saudi Arabia was at odds with his preaching, which also advocated a rejection of the religious concept of blind obedience to rulers.

In the book’s introduction, Surour captured the popular rejection of sectarianism at the time. He explained how young worshippers would push back at him as he preached on the danger of Shia. He also complained that several publishers in countries like Lebanon and Egypt threw out his manuscript after taking a glance at it. Eventually, though, his book became widely read. Such books are mostly distributed in pirated forms, but he wrote that he still sold more than 100,000 copies, a massive number by Arabic book-sale standards. The book became a key item in jihadists’ reading lists. The founder of the Islamic State, Abu Musab al-Zarqawi, for example, was reportedly an avid reader.

With time, these sectarian ideas gained traction. In Afghanistan, the Shia came to be seen as a thorn in the side of the mujahideen. The Iran-Iraq war polarized the region and heightened Shia-Sunni tension, even though it was also seen as an ethnic war between Arabs and Persians. Surour’s book provided a framework that combined the sectarian and ethnic dimensions of the war. Drawing also on the legacy of the 16th-century Safavid Dynasty, which helped formally convert Iran into a Shia state, figures like Surour drew a straight line between the Shia and conspiracies to fragment Islam from within, from the beginning of the faith to the present day. They claimed that the killer of Omar bin al-Khattab, the second caliph, was a humiliated Persian who arrived in Medina pretending to be a convert to murder him.

Surour did not single-handedly shape this sectarian narrative. He was a notable ideologue in arguably the most consequential political and religious movement in recent regional history, namely Salafi-Jihadism. Surourism, as his movement is known in the region, deviates from the violent extremism of groups like al-Qaeda, but its intellectual influence has been more far-reaching. Riyadh and Baghdad played instrumental roles in promoting his sectarian views. Other factors amplified these ideas: Saudi foreign policy since 1979 focused on exporting its brand of Salafism across the world; the proliferation of televangelists and Salafi and Islamist satellite channels in the 1990s and 2000s throughout the region added to the sectarian fervor. Such channels included sensationalist debates between Sunnis and Shia, and many clerics gained street cred from such shows.

Contemporary sectarianism thus has racial and geopolitical components. It may have existed in fragments in the past, but it was articulated and formulated into an ideology by figures like Surour and weaponized by regional regimes after 1979. The region plunged into an unrelenting series of crises: The Iran-Iraq War lasted for nearly a decade; the demise of the Saddam regime in 2003 was followed by Shia-Sunni wars, triggered by violent militias from both sides; the 2006 bombing of the Shia Askari mosque by al-Qaeda pushed Iraq into a civil war and aggravated the Shia-Sunni rift regionally; the Arab Spring caused another wave, especially in places like Syria, Bahrain, and Yemen. While Iran was able to pretend its regional outreach was cross-sectarian before 2011, it came to rely heavily on sectarian forces in its campaigns to quell the popular uprising in Syria and the ISIS threat in Iraq. Then there was the rise of ISIS, with its hysterical sectarian polarization, in 2013. During those periods, the sectarian fervor soared and remained at high levels.

Not anymore. The wider region is experiencing shifts that are reversing the trend, removing the factors that once gave rise to ethno-sectarian violence. Four developments could serve as indicators that the change is under way.

In May, Iraq held its first nonsectarian election since 2003. In contrast to previous elections, public sectarian discourse was noticeably absent. Most of the political blocs campaigned with cross-sectarian slogans. Much of the rivalry was shaped by inter-Shia competition to form the government and dominate the political scene. Before the election, it also became common to hear politicians and commentators emphasizing the need to rise above sectarianism and revenge in order to stabilize the country. This shift could also be interpreted as a reflection of a new reality: Sunnis have been crushed and their towns destroyed in the aftermath of the U.S.-led military campaign against ISIS. This reality could mean that the Shia majority, which now controls more of Iraq than it ever did, feels overly confident and secure, since “Sunni rejectionists” are no longer capable of serving as political spoilers.

But even so, the Shia desire to take revenge upon the Sunnis, so widely expressed in the early days of the rise of ISIS, was subsequently restrained by political and religious leaders of the Shia. The cycle of revenge was disrupted—at least for now. Take two statements from politicians in Baghdad: In 2013, former Prime Minister Nouri al-Maliki portrayed the campaign against extremists in Sunni areas in sectarian terms; he said the battle was between the followers of Hussein, the grandson of the Prophet Muhammad, and the followers of Yazid, the second ruler of the Ummayad Dynasty. The remarks provoked little outcry, and many dismissed them as solely targeting ISIS. By contrast, when an Iraqi parliamentarian spoke against historical figures last month, he was swiftly rebuked by his colleagues, overwhelmingly online.

The rapprochement between Shia leaders like Moqtada al-Sadr and Iraq’s Sunni neighbors is reinforcing this trend. The cleric—once notorious for his hard-line views, his prominent role in Iraq’s post-2003 bloody civil wars, and his attacks against American soldiers—visited Riyadh last year. The Saudi foreign minister, Adel al-Jubeir, also visited Baghdad six months earlier. Within Iraq, Sadr is now known for his comparatively moderate political and religious views that emphasize the inclusion and better treatment of Sunnis in Iraq. In March, those sentiments were given practical expression at a friendly soccer match held in the southern city of Basra between Iraq and Saudi Arabia.

These developments also played out amid the territorial demise of ISIS in Iraq and Syria. The group sought to deepen the sectarian schism by attempting to implicate Sunni tribes in massacres involving Shia individuals, and thus pushing Shia to engage in the cycle of revenge. The control of almost one-third of Iraq by ISIS added to the unease in Shia areas. After the demise of the group’s so-called caliphate, Iraqis’ attention turned to poor governance.

The fourth factor is more crucial. Recent changes in Saudi Arabia’s posturing might help to close off a major source of the new brand of sectarianism. Since the rise of the new crown prince, Mohammed bin Salman, Saudi Arabia has taken a different direction. Bin Salman has specifically referred to 1979 as a year that changed the kingdom and said that he wanted to shift away from the policies that followed. His rhetoric, as many now recognize, is just that—rhetoric. But some aspects of his policies will have a real, positive impact. Apart from their rapprochement with Shia clerics, Saudi authorities have also pledged to cease support for mosques outside their borders, and have imposed restrictions or pressure on their clerics at home. There has also been a noticeable absence of the usual sectarian fatwas and overheated rhetoric spewed by Saudi clerics.

The political situation in the region is still volatile, and there will continue to be a degree of destructive sectarianism. The war in Yemen against the Houthis could exacerbate Sunni tension with a Shia sect historically viewed as theologically close to Sunni Islam. But sectarianism, for now, is at its lowest levels in the 40 years since the Middle East’s transformational moment in 1979, and will likely remain low for the foreseeable future. Changes in Saudi Arabia haven’t promoted moderation; they have merely stopped the pumping of sectarian hatred into the region. So now, moderate institutions and individuals have their best chance in decades to shape the future of the Middle East.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.