RIYADH—Saudi Arabia on Tuesday lifted the world’s only ban on women driving, removing a restriction in the deeply conservative kingdom that had become a symbol of women’s oppression.

In a royal decree, King Salman announced that women will be allowed to obtain driving licenses starting next June, after a government committee studies how to allow women onto the roads driving their own vehicles.

The decision, immediately condemned by many Saudi conservatives on social media, comes at a time of profound change championed by the Saudi monarch and his son, Prince Mohammed bin Salman, who are leading efforts to relax the country’s strict social rules as they move to open up and modernize the country’s oil-dependent economy.

It also comes as the monarchy clamps down on perceived opposition: Saudi authorities have arrested dozens of people this month, from clerics to academics, in what the authorities described as a nascent antigovernment plot ahead of the king’s widely expected abdication in his son’s favor, the timing of which remains unclear.

“We refer to the negative consequences of not allowing women to drive, and the positive aspects of allowing them to do so, taking into consideration the necessary Shari’ah regulations and compliance with them,” King Salman said in the decree, referring to Islamic law.