Kayhan Ozer / Presidential Press Office / Handout / Reuters

Saudi Arabia has for weeks put out contradictory stories on the fate of Jamal Khashoggi. The Saudi journalist has variously been free, missing, and accidentally killed by a band of overzealous officials. On Tuesday, Turkish President Recep Tayyip Erdogan took direct aim at those contrasting narratives, announcing that Khashoggi had been killed in a “planned operation.”

Erdogan’s remarks not only cemented some of the details about Khashoggi’s fate after he entered the Saudi consulate in Istanbul on October 2. They also explain the tense and complicated rivalry between Turkey and Saudi Arabia.

Erdogan combines elements of the social conservatism of Islam with conservative democratic politics. He believes that only those parties in Muslim countries that also hold such views, such as the Muslim Brotherhood and its allied parties, are authentic. During the Arab Spring, Erdogan vocally supported the Muslim Brotherhood’s rise in Egypt and other places, but ultimately ended up backing the losing side.

Saudi Arabia, on the other hand, claims leadership of the Muslim world through its status as the custodian of Islam’s two holiest sites. It views the Muslim Brotherhood and any Islam-rooted political movement with antipathy. The kingdom—which, with U.S. backing in the 1980s, had supported militant groups—has cracked down on Islamist militancy, has staunchly opposed Iran’s clerical regime and its growing influence in the region, and has led the Arab blockade of Qatar, which pursues close relations with groups like the Brotherhood. (Qatar has emerged as one of Turkey’s main financial benefactors. In return, Ankara has been a staunch ally of Doha during the blockade.)

But while Saudi Arabia and Turkey often find themselves on opposite sides of regional conflicts, they are by no means outwardly hostile toward each other, even when their policy priorities collide, as with the blockade of Qatar or in the Khashoggi case. Erdogan is respectful of Saudi King Salman’s status in the Muslim world, and Riyadh is aware of Turkey’s military capabilities as well as its membership in NATO.

Thus far, the two countries have mostly refrained from publicly sniping during the Khashoggi investigation.

Erdogan’s remarks on Tuesday signaled something of a shift, amounting to a forceful, if implicit, criticism of the Saudi crown prince, Mohammed bin Salman. The Turkish president said the Khashoggi case had prompted several questions, including who had ordered 15 Saudis to come to Istanbul, why the Saudis issued so many inconsistent statements about the case, and why Khashoggi’s body was still missing. “No one should think that this matter will be closed before all of these questions are answered,” he said.

Still, he was careful to make conciliatory references to the king, acknowledging that the “Saudi administration has taken a significant step by admitting to the murder,” and adding, “I do not doubt the sincerity of the Custodian of the Two Mosques.”

Erdogan “doesn’t want to rupture [relations] with the Saudi king,” Soner Cagaptay, who studies Turkey at the Washington Institute for Near East Policy, said. The Turkish leader “has decided to separate the king from his son, targeting only the crown prince regarding the Khashoggi murder,” he added.

Turkey realizes the young crown prince could be on the Saudi throne for decades to come. Prolonging the crisis could poison relations with the kingdom. (This is likely to be the message Gina Haspel, the CIA director, delivers when she visits Ankara on Tuesday.)

Erdogan’s speech was nevertheless “a real effort to tarnish and weaken Mohammed bin Salman,” said Steven Cook, an expert on Turkey and Saudi Arabia at the Council on Foreign Relations. Erdogan and the crown prince, Cook added, “believe themselves to be two of the most important [leaders] in the Muslim world.”

“Erdogan wants to bring him down a notch or two,” Cook said.

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