A demonstrator dressed as Saudi Crown Prince Mohammed bin Salman attends a protest outside the Saudi consulate in Istanbul, where the murdered Saudi journalist Jamal Khashoggi was last seen.Osman Orsal / Reuters

When Jamal Khashoggi walked into the Saudi consulate in Istanbul a year ago today, he had been away from his home country of Saudi Arabia for just over a year. And it was a year in which the kingdom had changed enormously—from bright changes such as the introduction of movie theaters and the lifting of a ban on women driving to much darker ones.

Though Khashoggi had written about how unbearably oppressive his country had become since the rise of Crown Prince Mohammed bin Salman, which was the reason he had gone into exile, the veteran Saudi journalist and incisive observer had not appreciated the extent and depth of those darker shifts—and so he walked into the death trap laid for him inside the Saudi diplomatic mission.

His murder inside that consulate—carried out in the most brutal of ways, with a saw apparently used to dismember him—has mostly been seen as a domestic Saudi affair, one in which a vocal critic of a ruler, speaking from a powerful perch, was eliminated. But it is also inscribed in the larger context of the rivalry between Saudi Arabia and Iran, a 40-year competition for dominance in the Middle East that began after the 1979 Iranian revolution.

The outlines of this contest are well known. The two countries are dominated by separate sects of Islam, and each claims to be the regional leader—Saudi Arabia through its custodianship of Islam’s main shrines, its natural dominance in a majority Sunni Muslim world, and its checkbook diplomacy; Iran thanks to its revolutionary ideology and anti-Western rhetoric, which it exports to countries with large Shia populations, such as Iraq and Lebanon, or longtime allies, such as Syria. And while they have for decades hurled angry rhetoric at each other, they have so far not gone to war against each other—the bloodletting is done by proxy.

But the contours of the competition are also changing under Mohammed bin Salman, known as MbS. The prince has rejected the traditional, consensual way of ruling favored by his elders, opting against the compromise and preservation of the status quo that they preferred, even in their dealings with Iran. In doing so, he has injected a new element of uncertainty into a 40-year-old game.

So while an American strike against Iran in response to last month’s attack on Saudi oil facilities seems to have been averted for now, tensions in the region will not abate and will, if anything, worsen; today, both Tehran and Riyadh seem determined to go for an all-out victory for dominance of the region, at all costs and using all means, short of an all-out war. And whereas the Iranians are upping their use of proxy groups and asymmetrical warfare across the region, MbS is banking on a unique set of circumstances: Aside from his own brazenness, he is helped by an American president who is unpredictable, but intent on squeezing Iran and an Israeli prime minister willing to strike Iranian proxies in Iraq and Syria. Conveniently, the war footing helps MbS further consolidate his position internally, as Saudis are called on to close ranks.

Since 1979, the rivalry has followed predictable patterns of tension and détente. Once friendly rivals, twin pillars in the American effort to oppose communism in the Middle East, Saudi Arabia and Iran became bitter rivals in the year that followed the Iranian revolution, which turned the country into a theocracy, with Ayatollah Ruhollah Khomeini as supreme leader. Khomeini had a visceral hatred of the Saudi royals, whom he described as “camel grazers of Riyadh and the barbarians of the [Saudi desert of] Najd.” Khomeini also envisioned himself as a pan-Islamic leader, which rattled the Saudis, who feared for their own role as custodians of Islam’s two holy mosques, in Mecca and Medina.

What ensued was a cycle of alternating decades of war and peace, beginning with the devastating Iran-Iraq War, when the Saudis provided billions of dollars to the Iraqi dictator Saddam Hussein to fight Iran, essentially on their behalf and that of the rest of the Gulf. At the height of the conflict, when the Saudis feared an all-out Iranian victory, they offered Tehran a cease-fire and huge sums of reparations, but the Iranians refused. The 1990s were the era of peace, during which then–Saudi Crown Prince Abdullah bin Abdulaziz and Iran’s President Hashemi Rafsanjani and his successor, Mohammad Khatami, entertained cordial ties, exchanged visits, and even signed cooperation agreements, a blossoming relationship that frustrated the United States. (When Iran was blamed for the 1996 attack on the Khobar Towers in the kingdom, which killed 19 American airmen, Saudi Arabia appeared to drag its feet in cooperating with the FBI investigation, eager to shield its newfound friendship with Iran.)

Then came the U.S.-led invasion of Iraq in 2003, offering Iran an opportunity to revise the score of the Iran-Iraq War, infiltrating the country that had caused it so much devastation in the 1980s. Saudi Arabia was again on the back foot, watching Iran build up its proxies. But even when they sounded bombastic, Saudi monarchs and crown princes did not consider going to war, preferring to rely on the Americans to, as King Abdullah once told American officials, cut off the head of the snake. After the election of Barack Obama, the thaw was not between Riyadh and Tehran, but between the U.S. and Iran as Obama pursued a nuclear deal in the hope that it could also help defuse the competition. In March 2016, when Obama suggested in an interview with The Atlantic that Iran and Saudi Arabia could play nice and share the region, the Saudis were apoplectic.

King Salman bin Abdulaziz, Abdullah’s successor, had been in power since January 2015, and his son, MbS, was already deputy crown prince and defense minister. MbS believed that decades of compromise and consensus had brought the kingdom nothing; neither had the billions of dollars it had spent on allies and proxies. MbS also believed that previous kings had been deceived by Iran’s promises of conciliation and engagement. In a 2017 television interview with a Saudi channel, he made clear he would not fall into the same trap.

His first major act as defense minister was to go to war in Yemen against the Houthis, a rebel group aligned with Iran—a devastating conflict that continues and that has bogged down the Saudis and their Gulf allies, and only strengthened Iran’s hand. In the same 2017 television interview, MbS also declared, “We know that the main goal of the Iranian regime is to reach and conquer the Holy Shrine of Islam. We won’t wait for them to bring the fight to Saudi Arabia; we will make sure it occurs there in Iran.” That quote was used in a video animation, created by a previously unknown Saudi outfit, depicting a hypothetical war between the two countries in which the kingdom strikes Iran, defeats its elite Islamic Revolutionary Guards Corps, and conquers Tehran. Between the quagmire that is Yemen and the kingdom’s apparent inability to defend its own oil installations, such a victory is not within Saudi Arabia’s reach, but may be the kind that MbS aspires to.

In their constant effort to outdo each other, the Saudis and the Iranians have taken many pages out of each other’s books—though they would never admit it. This brings us back to the Khashoggi assassination, which Agnès Callamard, the UN special rapporteur for extrajudicial killings, investigated and declared to have been premeditated, describing it as a “state killing.” MbS told PBS Frontline, “I get all the responsibility because it happened under my watch,” but denied ordering the killing or knowing about it beforehand. While there have been forcible abductions of Saudi royals to return them to the kingdom, only one Saudi dissident had so far ever been known to have been forcibly disappeared, in 1979, and likely killed. Meanwhile, over time, the Iranian regime has perfected the art of silencing dissent, at home but also abroad, hunting down dissidents and carrying out assassinations in broad daylight. The fear or respect it commands at home and in the region is not something the Saudis have ever mastered. Neither is the fear or respect that Iran derives from its ability to build and manage its proxies across the region. But it is precisely the type of authority that MbS is seeking, inside the kingdom and beyond its borders.

MbS appears to be trying his hand at the Iranian playbook. The rules of the game between Iran and Saudi Arabia have changed, and the murder in the consulate was a gruesome twist. Khashoggi was one of this long-standing rivalry’s many victims, but he won’t be the last.

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