SAUDI ARABIA has rounded up so many top officials that it is running out of space at the Ritz-Carlton in which to jail them. Since November 4th more than 200 princes, ministers and businessmen have been detained. A rather more quotidian Marriott has been commandeered to house the overflow. Billed as an anti-corruption sweep, the jailing also feels unmistakably like a purge of political foes. Other dramatic changes are also under way as the country pushes forwards with major economic and cultural reforms. Women will be allowed to drive from next summer. Cinemas may soon be opened for the first time in decades, as will new tourist facilities. Saudi Arabia wants to build a high-tech $500bn economic zone on its north-west coast. At the centre of all these changes is Muhammad bin Salman (widely known as MBS), the young crown prince poised to become Saudi Arabia’s strongest ruler in decades. How did he amass so much influence?

King Abdel-Aziz, the founder of the modern Saudi state, had dozens of male heirs. To reduce rivalries in his sprawling family, he established a horizontal line of succession, with power passing from one son to the next. One, King Saud, was deposed in 1964, partly over fears that he wanted his own son to succeed him. Other royals carved out fiefs: one prince oversaw the army, another the foreign ministry. But the sons of King Abdel-Aziz have aged. The youngest is now in his 70s. The current king, Salman, is fading. The gerontocracy has struggled with the task of running a modern, youthful state, where 59% of the 20m citizens are under 30. King Salman started to address this in 2015 by naming a member of the younger generation—his nephew, Muhammad bin Nayef—as crown prince. He lasted just two years in the role. King Salman cast him aside in June and replaced him with his favoured son, Muhammad bin Salman. This marked the first time a Saudi monarch had officially tried a dynastic transfer of power.

The new crown prince wasted little time consolidating power. After the recent shake-up, which he orchestrated in the name of his frail father, Prince Muhammad and his allies control all three branches of the security services. For only the second time in Saudi history, the foreign minister is a commoner, a career diplomat who owes his position to the ruling duo. In September, police detained dozens of critics, among them two prominent Muslim scholars. The threatening message of the arrests seems to have been understood. The king’s decision to end the ban on women driving, which followed, attracted little dissent, even from the conservative religious establishment. Nor has there been much grumbling over the purge. The Saudi king has long been primus inter pares, but Prince Muhammad is breaking this delicate balance. Though he casts himself as a youthful reformer, he is transforming Saudi Arabia into a truly absolute monarchy.

The defenders of the crown prince say these abrupt changes are necessary. In an era of low oil prices, Saudi Arabia needs to diversify its economy. Decades of corruption have cost the kingdom untold billions. Unlike many of his contemporaries, Prince Muhammad is seen as hard-working and clean. But his actions so far have also been destabilising. He has shown a taste for ill-conceived foreign adventures, from a costly war in Yemen to the unsuccessful blockade of neighbouring Qatar, which has achieved little beyond dividing the Gulf Co-operation Council. Closer to home, he is ending a long period of consensual politics that ensured stability. Prince Muhammad is only 32, 49 years younger than his father. He could conceivably rule the kingdom for decades. But the list of his enemies is already long.