The execution last week of a Saudi prince who shot another man dead in a street brawl caused some surprise across the Western world.

The dramatic punishment—carried out on the direct orders of King Salman—challenged a lazy assumption sometimes made that Saudi Arabia is a corrupt country where the rich, well-connected and the powerful get to do whatever they like.

But the beheading execution of Prince Turki bin Saud al-Kabir has shown that Saudi Arabia’s brand of Sharia justice applies to the wealthy and titled, too.

According to reports, the prince admitted to shooting Adel al-Mohaimeed in 2012.

Although there are conservatively estimated to be some 6,000 members of the extended Saudi royal family, it is definitively not the case that Prince Turki was a particularly minor or expendable royal.

Indeed, as the prince’s name made clear, he was a direct descendant of the legendary Saud Al-Kabeer (which means “Saud the Great” or “Saud the Elder”).

Saudi expert Robert Lacey, author of the erudite history of the country, The Kingdom, tells The Daily Beast that while the family group is not in the direct Abdul Aziz line of succession, it is very highly respected across the country.

“Saud Al-Kabeer was married to Abdul Aziz’s favorite sister, Nura, considered a closer confidante to the king than anyone else in the family. The massive women’s university that you pass today when entering Riyadh from the airport is named in her honor,” says Lacey, adding, “Saud Al-Kabeer became a prominent figure in the majlis of inner advisers surrounding Abdul Aziz (who reigned until 1953).

“Saud was known for his speaking his mind, even in direct disagreement with the king, and was the more respected for it.”

While no member of the royal family has been put to death since 1975, Lacey says it is “certainly not unusual for King Salman to discipline errant members of his family firmly. As governor of Riyadh for many years—Salman is really the architect of modern Riyadh—he had a prison in his palace to which he regularly consigned princes who misbehaved.

“As king, he has evidently used this latest episode to convey the message that no one in Saudi Arabia should consider themselves above the law.”

The execution has certainly played well domestically, with a hashtag broadly equating to, “decisive Salman orders retribution for a prince,” trending in Saudi Arabia, which has executed 134 people so far this year, according to the organization Human Rights Watch.

The king has been praised domestically for his integrity. The execution has, sources say, been “accepted” by the entire extended royal family without dissent.

According to a report in The Washington Post, Mohammed al-Masloukhi, the imam of Al Safa mosque, said the execution was carried out in the presence of the victim’s father, who watched with “a fixed expression on his face.”

The imam, describing the prince’s “heartbreaking last moments with family members” who visited him one last time in prison, said the convicted prince “recited Koranic verses” before his execution.

There have been suggestions in some quarters that Saudi Arabia’s rulers have used the execution of the prince to shore up their popularity, and these are certainly tough times in the kingdom, which launched an oil price war by refusing to cut oil production in the face of a global slump in demand in 2014.

The hope was that this would lead energy prices to fall to a point where American frackers would be put out of business. Energy prices did fall, massively, but the strategy was a failure; the frackers simply became more efficient—and Saudi Arabia’s main revenue stream shrank dramatically as the oil price collapsed.

Lacey says he is “not at all surprised by the execution,” which is consistent with Salman’s principles and character, but rejects as bogus allegations that the prince was sacrificed in a cynical attempt to improve the image of the monarchy.

“Some people refuse to give any credit to the Gulf monarchies,” he says. “It’s worth remembering that Saudi Arabia has never executed a single secular human-rights protester or campaigner—unlike Iran, which strings them up on cranes by the dozen.”

Indeed, it has emerged that the execution was in fact entirely in line with Sharia justice for murder.

Mohammed Khalid Alyahya, non-resident fellow at the Atlantic Council, told Newsweek that Kabir was “held to the same legal standards as others,” saying, “It’s very clear, if the family [of the victim] agrees to give him clemency, then he is exempt from the execution; if they don’t, then it goes through. There is no way around it.”