BEIRUT, Lebanon — For decades, if someone in Saudi Arabia got drunk in public or wrote an article that provoked the kingdom’s ultraconservative judges, that person could have been flogged in a public square.

Now, as part of his effort to reshape how the kingdom is run, Crown Prince Mohammed bin Salman has done away with flogging as punishment, and perhaps dampened the international condemnation that came with it.

Saudi judges can still order the beheading of murderers and drug dealers, but lower-level offenders will now be spared the rod and will get fines or jail time instead.

Saudi officials hailed the move to abolish flogging, which was confirmed by the kingdom’s state-run human rights commission on Saturday, as another bold reform by Prince Mohammed. Western human rights campaigners gave more muted reactions.