When Egyptian newspapers recently quoted Prince Mohammed calling Turkey part of an “evil” alliance in the region, he hastened to deny it, issuing a statement that he was criticizing the Islamists of the Muslim Brotherhood, not the government of Turkey.

But tensions between them still rose.

Mr. Erdogan remains close to the Muslim Brotherhood, which Saudi Arabia considers a national security threat and has branded as a terrorist organization. Turkey has also remained close to Qatar, another regional friend to the Brotherhood.

As he has consolidated power, Prince Mohammed has become increasingly bold. At age 33, he has charmed younger Saudis and many in the West by promising to diversify the Saudi economy and weaken the kingdom’s religious authorities. He has let women drive and allowed concerts and movie theaters — all novelties for the kingdom.

On a tour of the United States this year, Prince Mohammed was welcomed as a statesman. He met with President Trump; dined with Rupert Murdoch; had his picture taken with Mark Zuckerberg of Facebook, Bill Gates, and Tim Cook of Apple; and hung out with the actor known as The Rock.

But many of his actions have backfired.

His military intervention in Yemen has so far produced only a stalemate and humanitarian crisis. His detention of the prime minister of Lebanon was ultimately ineffectual. And his imprisonment without due process of hundreds of wealthy businessmen, including several of his royal cousins, unnerved many of the investors he had set out to woo.

And now there are the allegations about Mr. Khashoggi.

Ms. Wittes, the Brookings scholar, said that if the Saudis “are willing to assassinate a journalist on foreign soil because he was mildly critical, these international partners are going to be much less likely to send their students, researchers and experts to the kingdom or to set up long-term partnerships with the kingdom.”

Being seen in the eyes of the world as responsible for such a grisly assassination might once have been enough to disqualify a crown prince from succession to the Saudi throne. But Prince Mohammed, who is known as MBS, appears to have amassed more control than any leader in decades over the sources of hard power in the kingdom — the military, the national guard and the Interior Ministry — as well as the oil ministry.