In recent days, news of Saudi Arabia’s execution of the Shia leader Nimr al-Nimr, and the diplomatic clashes with Iran that followed, has often been accompanied by an explanation that, in simplified form, goes something like this: The schism between Sunni and Shia Islam is an ancient one, expressed today in part through the rivalry between Sunni Saudi Arabia and Shia Iran. Those two countries are intractable enemies—“fire and dynamite,” as one Saudi journalist memorably described them. Their proxy battles and jockeying for leadership of the Muslim world have ravaged the Middle East and, as has been vividly illustrated this week, could yet ravage it further.

Frederic Wehrey doesn’t buy that narrative. A scholar at the Carnegie Endowment for International Peace who researches identity politics in the Persian Gulf, Wehrey believes the execution of Nimr, rather than being the latest salvo in the Saudi-Iran shadow war, was primarily motivated by domestic politics in Saudi Arabia. Specifically, the Saudi royal family wanted to appease powerful Sunni clerics angered by the kingdom’s cooperation with the United States in the fight against ISIS, a Sunni jihadist group.

Nimr, Wehrey pointed out in an interview, was executed along with dozens of Sunni jihadists. To Wehrey’s knowledge, the Shia cleric never called for armed insurrection against the state (as the state alleged he did). But Nimr’s biting condemnations of the royal family made him an “easy target for the House of Saud to throw in and dispose of, and they could say to their Sunni constituents, ‘Look, we’re not being soft on Iran, we’re not abandoning the Sunnis even though we’re fighting ISIS.’” (Wehrey, who in 2013 visited the village in Saudi Arabia’s Eastern Province where Nimr preached until his arrest in 2011, characterized the cleric as a “populist” who didn’t appear to be a full-throated supporter of Iran. Nimr, he said, advocated not just an end to discrimination against Saudi Arabia’s minority Shiites, but also economic development for the downtrodden community where he worked.)

Wehrey also challenged the idea that Iran and Saudi Arabia are the puppet masters of the region’s sectarian struggles—from Syria and Iraq to Yemen and Lebanon—arguing that the two countries are just as much at the whim of forces well beyond their control.

“When you have the regional order collapsing, regional states are collapsing, these two oil-rich powers—each of which claims to be a leader of the Islamic world and a leader of the Middle East—are drawn into the vacuum,” he told me.

Nor, he added, can the Sunni-Shiite split fully or even largely explain hostilities between Iran and Saudi Arabia. As Wehrey and several coauthors detailed in a 2009 study, the Saudi-Iranian relationship has actually oscillated between cooperation, competition, and confrontation in recent decades, even as religious differences between the two nations have remained constant.

“This notion that these two powers are predestined for immutable rivalry because of the ancient Persian-Arab divide or the ancient Sunni-Shiite divide—that can only get us so far,” he said.

Likewise, in Wehrey’s view, Sunni-Shiite tensions are not some intrinsic dimension of the Middle East; instead, they’re the product of a series of tectonic shifts in the region’s power politics, which in turn have prompted state (and, increasingly, non-state) actors to advance their interests by manipulating religious sentiments. What matters most in this story of upheaval is the interplay between government institutions and individual identity, he argues, not religion per se.

“The reasons these religious differences get inflamed or get sectarianized is because of a breakdown of governance, a breakdown of economic distribution,” Wehrey asserted. “There have been plenty of times in the Middle East when these differences have been subsumed by other identities.”

According to Wehrey, we’re currently witnessing a “third wave” of sectarianism brought on by the Syrian Civil War and the ascent of ISIS, and accentuated by social media. The first wave followed Iran’s Islamic Revolution in 1979 and Saudi Arabia’s decision to promote the fundamentalist Salafist strain of Sunni Islam to counter Tehran’s Shia ideology. The second gathered force in the power vacuum resulting from Saddam Hussein’s ouster in Iraq in 2003, and swelled amid the rise of Sunni jihadism, the renewed assertiveness of Iran, and the spread of the Internet.

“What I think is so dangerous about this wave of sectarianism that we’re in right now ... is that it has escaped the ability of states to manage it,” Wehrey told me.

An edited and condensed transcript of my conversation with Wehrey follows.

Uri Friedman: We hear rumblings from time to time about a Saudi-Iran proxy war—the two countries supporting opposite sides of conflicts in Syria, in Yemen, in Lebanon, and elsewhere in the region. Is the news surrounding Nimr’s execution an example of the shadow war coming above the surface and suddenly being evident to people?

Frederic Wehrey: I would not place the execution in the context of a proxy war or shadow war, because Iran was not waging a proxy war inside Saudi Arabia or the Gulf. … Since the 1990s, Iran has pulled back from really meddling in the Gulf and trying to stir up violence and unrest in the Gulf. …

When you have the regional order collapsing, regional states are collapsing, these two oil-rich powers—each of which claims to be a leader of the Islamic world and a leader of the Middle East—are drawn into the vacuum, for a variety of reasons. A lot of it is rooted in the domestic politics of each country. In Iran, you have a hardline Revolutionary Guard clique that is trying to assert itself vis-à-vis the pragmatists that have just signed the nuclear deal [with world powers], so they’re trying to assert themselves on the regional front by saying, “We still are a power to be reckoned with.” They’re asserting themselves in these regional conflicts. In Saudi Arabia, there’s this new king ... who is using these regional wars as a way to bolster his bona fides and raise his nationalist profile and build support. We can’t really separate the regional adventurism from the domestic politics of each country.

But this notion that these two powers are predestined for immutable rivalry because of the ancient Persian-Arab divide or the ancient Sunni-Shiite divide—that can only get us so far, because there’s been periods where [Iran and Saudi Arabia have] been on the same sides of conflicts, they’ve cooperated in a chilly manner—never warm. During the Cold War, they were both monarchies, they both faced a threat from a communist insurgency, [and] from [Egyptian President Gamel Abdel] Nasser. They cooperated there.

Now, what [the rivalry is] really about is different styles of government. When the Iranian regime came to power, [Ayatollah Ruhollah] Khomeini was against monarchy, he promised to overturn monarchy; the Saudis are a monarchy. It’s also about regional legitimacy—who speaks for Muslims. And I think there was a period, not so much now, but around 2006, where Iran seemed to be stealing the thunder from the Saudis on issues that matter to the Arab street … [like] Palestine, standing up to the West, fighting the American occupation in Iraq. Iran was really seizing the day on all those issues—especially during the 2006 Lebanon War, where you had Arabs cheering in the street for this Iranian-backed proxy group [Hezbollah]. There was this famous poll that was taken in Cairo where [the pollsters asked] “Who’s the most popular Arab leader?” and the average Egyptian on the street said it’s [Iranian President Mahmoud] Ahmadinejad. We’re well past that now because now Iran is being forced into a sectarian mode, the mask is off, they are clearly against Sunnis—you could argue they’re against Arabs.

Friedman: Can you go into more detail about the domestic component of the execution of Nimr? Put yourself in the House of Saud—in the head of King Salman. What do you think was the primary motivation for the execution?

Wehrey: At the time when Nimr was sentenced to death, the Saudis had just signed up for the anti-ISIS coalition with the Americans, and so that put them in a difficult position vis-à-vis their Sunni clerical constituency. The Sunni clerics have always said, “Well, ISIS is kind of bad, but at least ISIS is standing up to the Shias in Iran,” and there was some question about the royal family [being] allied with the Americans against ISIS. Now, there is a real threat to the royal family from the Sunni militants, from Sunni jihadists. The Saudi regime decides to execute all of these Sunni criminals. To soften the blow, they have to throw in a couple Shia. That’s the way I see this. They lumped it all together, they did it all at once, because Nimr has been such an object of hatred and venom for the Sunni clerics. He was an easy target for the House of Saud to throw in and dispose of, and they could say to their Sunni constituents, “Look, we’re not being soft on Iran, we’re not abandoning the Sunnis even though we’re fighting ISIS.” It’s this sectarian balancing. …

Another point we should emphasize is that it’s been tremendously useful to the Saudis to inflate the Iranian threat as a way to ingratiate themselves with the U.S., as a way to distract from their own failings at domestic governance, to rally the rest of the Gulf into a state of emergency. The sense that there’s this external threat—the Gulf states need to form this union and the Saudis are best-equipped to lead it—it’s a classic nationalist strategy: Create this external enemy to deflect attention from domestic pressures and challenges. …

Iran definitely is backing proxies in Syria, definitely in Lebanon, but in the Gulf the real roots of Shia unrest are local, they are not Iranian proxies. There may be a few fringe, marginal groups that receive Iranian support, but the majority of the dissidents and the protesters are homegrown, and many of them want change within the system. They’re not seeking to overthrow the government—they want reforms that are non-sectarian, constitutional, releas[ing] political prisoners, economic reform. That’s what I heard when I was in the Eastern Province. …

Friedman: In the coverage of the Iran-Saudi spat over the last few days, there’s been a lot of talk about the Sunni-Shia struggle, and that these countries are the two titans of that struggle. To what extent do you think that sectarian framing of the conflict is valuable versus a red herring?

Wehrey: We are living in a sectarian age where sectarianism has resonance. There are people, there are elites, there are media, there are clerics that peddle it, that inflame it, but they would not be doing so if there weren’t an appetite for it. It matters in the sense that this is the way that identities are being constituted with the breakdown of institutions, the breakdown of governments; people are turning to these identities. And you have these two regional powers that are inserting themselves into conflicts—that are backing proxies that are themselves very sectarian.

Does that mean that [officials are] sitting in Tehran and saying, “We need to think about how to safeguard Shia in the region?” I don’t think they really care, and I think statesmen and politicians and policymakers view the region in more cold, realist, power-political ways, and I think they see a vacuum, they see a rival. They’re using sectarianism as a way to advance interests, especially the Saudis. The Iranians have always downplayed sectarianism because if you’re a Shia minority in the Sunni world, it doesn’t serve your interests to highlight the sectarian divide, because that means you’re always going to be in the minority. [The Iranians] have always said that, “We want to speak for all Muslims, we advance all Muslims,” or they play the class card. They say, “We advance the interests of the oppressed.” The oppressed can be Palestinians, the oppressed can be Bahrainis. It just so happens that the oppressed in many regions are in fact the Shia. But that logic hasn’t really helped them with Syria, because they’re backing a [Shia] government that is killing its own. …

I don’t doubt there are [Saudi] royals that genuinely hate the Shia and are sectarian, but I think from a political and policy perspective, they are looking at the region in realist terms and they also see an expediency to sectarianism. And the actors that they’re backing on the ground in these places are very sectarian—are Salafis, are Sunni jihadists. …

What I think is so dangerous about this wave of sectarianism that we’re in right now—and I call it “third-wave sectarianism”—is that it has escaped the ability of states to manage it. There was this notion—I think [U.S. President Barack] Obama may have alluded to it—that if only Iran and Saudi Arabia were to bridge their differences and reach an accommodation, the sectarianism in the region would go away. And that’s true to a certain extent, maybe the temperature would be lowered a bit. But what’s happening on the ground in Iraq, and the struggle for local power between Sunnis and Shias, is very real, and it’s beyond the ability of Saudi Arabia and Iran to stop or manage or maybe control.

Now does that mean it’s all about these two rival sects of Islam? I think a lot of this is about governance, it’s about access to economic resources, it’s about the center and the periphery, it’s about class. There are other ways of looking at it. The reasons these religious differences get inflamed or get sectarianized is because of a breakdown of governance, a breakdown of economic distribution. There have been plenty of times in the Middle East when these differences have been subsumed by other identities. Some of the early members of [Iraq’s Sunni-dominated] Baath Party were Shia. The Saudis did in fact back the Shia candidate in the [2010] Iraqi elections, [Ayad] Allawi. Iran is backing Hamas, which is a Sunni power. There are examples of this theory collapsing elsewhere.

The U.S. needs to not get drawn into talking about Shia-Sunni reconciliation. The U.S. needs to focus on governance in the region and restoring the broken system. How does the region meet the needs of its citizens? If there were more open societies, if governments were more representative. I heard this in the Gulf: “If we had a more representative political system, people wouldn’t be drawn into these Sunni-Shia identities. They would matter less, there would be other forms of affiliation.” But you have ruling families in the region that find it very expedient to play the sectarian card to keep power.

Friedman: If we’re currently experiencing “third-wave sectarianism,” what were the first two waves?

Wehrey: I think the first wave was from 1979 up until the 1990s, and that was where you had the Iranian Revolution, which was a real threat to the Sunni system—to the Sunni monarchies and the Sunni governments—and it sparked a counter-reaction led by Saudi Arabia that was sectarian. So the Saudis thought, “What’s the best way to marginalize and isolate the Iranian threat?” Well, it’s to whip up a Sunni sense of identity and play up [the fundamentalist movement known as] Salafism. This is when you have the emergence or the mushrooming of Salafism as a counterweight to Iranian ideology; a lot of the Saudi religious tracts that are anti-Shia that we see right now originated from that period. It was an attempt to demonize and exclude Iran as an aberration from the mainstream. There was [then a] lowering of tensions, a rapprochement between Iran and Saudi Arabia, in the 1990s.

I think the second wave was with the fall of Saddam in Iraq and later with the rise of an aggressive Iran under Ahmadinejad in 2005, which was seen in Arab capitals as part two of the Iranian Revolution. The removal of Saddam as an Arab buffer, the breakdown of an Arab state, created this vacuum. You also had the rise of jihadism. The second wave is when you start to have non-state actors using sectarianism. You have [al-Qaeda in Iraq leader] Abu Musab al-Zarqawi, you have Hezbollah in Lebanon. This also coincided with social media. ... [In the past] if there was a massacre of Shia in one corner of the region, maybe people didn’t know about it. Maybe they saw it later on TV, and then you had Al Jazeera, and now you have YouTube, now you have Twitter, so it’s instantaneous. It creates a form of instantaneous participation in an event that exacerbates feelings of partisanship among sects. A Sunni that is watching the killing of Sunni in Bahrain, that is watching the killing of Sunnis in Fallujah, Iraq, it creates a shared affinity and it gives a platform for very sectarian voices to propagate their vitriol. …

The third wave was post-Arab Spring. The Syria conflict was this vortex of sectarianism that really sectarianized the Arab Spring. The Arab uprisings were not about sectarian grievances—even in [the Shiite-led protests in] Bahrain, many of the grievances were about housing, about reform, and there were some Sunnis that participated. Certainly there were Shia. The Arab Spring really took a nosedive with Syria and then, of course, the Islamic State. We know where we’re at with that.

Friedman: You often hear commentary that Iran and Saudi Arabia are orchestrating turmoil and local actors in the Middle East—that they’re inflaming sectarian conflicts. But you seem to be describing both countries as subject to forces they don’t totally control anymore and responding to larger regional breakdowns, without necessarily the agency that some people ascribe to them.

Wehrey: It’s a misunderstanding of how power politics works in the Middle East to ascribe authority or control to any power to control events on the ground. Yes, the Iranians have [the ability] to train and equip and control these proxies, but I can tell you from working in Iraq and having followed this Iranian regional power from the Pentagon, that that’s not always the case—that the Iranians have been surprised, frustrated, flummoxed, angry at the way things have happened on the ground. And the same thing with the Saudis. The Saudis have even less of an institutional capability to create and manage proxies. They typically just distribute cash, whereas the Iranians at least have advisors on the ground. …

I don’t think this is being stage-managed by these two powers. The analogy there is the Cold War. It wasn’t like the Kremlin was central for everything. We [Americans] tended to have that mistaken view, but many of [the real players] were autonomous actors across the Third World.