BEIRUT, Lebanon — Saudi Arabia on Tuesday executed a member of the royal family for murder, the first time in four decades it had done so, after he was convicted of shooting another man to death during a brawl.

Prince Turki bin Saud bin Turki bin Saud al-Kabeer was put to death in the capital, Riyadh, according to a report by the Saudi state news service. While the report did not detail the method used, most death penalties in Saudi Arabia are carried out by beheading in a public square.

The rare event rocketed around the kingdom’s social media networks, with some Saudis saying they never imagined such a thing would happen and others arguing that it showed the quality of their justice system, which follows a strict interpretation of Shariah law and is often criticized by human rights groups and Western governments for what they consider harsh and arbitrary punishments.

“The greatest thing is that the citizen sees the law applied to everyone, and that there are not big people and other small people,” Abdul-Rahman al-Lahim, a prominent Saudi lawyer, wrote on Twitter.