They seemed untouchable. The head of a huge construction conglomerate. A prince who led Saudi Arabia's elite national guard. A billionaire investor who was one of the richest people in the world.

But in one breathtaking stroke, the men were detained by the Saudi authorities in a purge that began Saturday night and swept up some of the most powerful and recognizable names in the country, including members of the Saudi royal family, cabinet ministers, titans of media and industry, and former officials. The detainees included Prince Alwaleed bin Talal, a wealthy investor who owns major stakes in such companies as Twitter and Citigroup, according to an associate of his family.

On Sunday, Saudi officials cast the arrests as the first shot in a battle against the country's notorious and deeply rooted corruption, and as part of a broader effort by the country's young and ambitious crown prince, Mohammed bin Salman, to refresh the stagnating Saudi state.

For others, though, the detentions seemed more like the continuation of a process that had been accelerating over the past two years: the ruthless consolidation of power by the crown prince before his father, King Salman, dies or abdicates the throne. That process — which included eliminating critics and rivals, but also elite figures who presided over independent power centers — amounted to a radical restructuring of the Saudi order, analysts said.

"Mohammed bin Salman wants to destroy the game of checks and balances that had characterized Saudi Arabia over the past few decades," said Stéphane Lacroix, a professor of political science at Sciences Po in Paris and the author of "Awakening Islam: The Politics of Religious Dissent in Contemporary Saudi Arabia." The goal was "autocratic monarchy," he said. "No fiefdoms that could counter his decisions."

The detentions come at a time of political, social and economic upheaval in Saudi Arabia, an absolute monarchy that has become one of the Trump administration's closest Middle East allies. At the center of the storm is the 32-year-old crown prince, often referred to by his initials, MBS, who is widely seen as the architect of the kingdom's increasingly assertive policy initiatives at home and abroad.

Saudi leaders have embarked on a widely publicized drive to modernize the ultraconservative kingdom, relaxing social restrictions and liberalizing its oil-dependent economy. Last week in Riyadh, the Saudi capital, a lavish conference that was intended to encourage international investment featured robots as well as planned, futuristic megaprojects.

Saudi Arabia has also adopted an increasingly muscular and confrontational posture in the Middle East that has focused on combating the influence of Iran, the kingdom's archrival. Over the past two years, the Saudis have led a military campaign in neighboring Yemen against a rebel group that Saudi officials regard as an Iranian proxy force.

The war has killed more than 10,000 Yemeni civilians and is effectively at a stalemate: On Saturday, the rebels, known as the Houthis, fired a ballistic missile that reached Riyadh — their deepest strike yet inside Saudi territory, and a sign that the conflict was not nearing an end.

Saudi Arabia has also led a group of Arab states in a boycott of Qatar, a neighboring Persian Gulf country, in a rift that has sharply divided the Trump administration's closest Arab allies. And on Saturday, Lebanon's prime minister announced his resignation while in Saudi Arabia, in what appeared to be an attempt by the Saudi leadership to confront Iranian influence in Lebanon.

Analysts said the detentions on Saturday were part of an intensifying drive to centralize power under the crown prince. The effort has included sidelining potential challengers from rival branches of the royal family, and a crackdown on dissidents, including clerics, over the past few months.

The officials detained Saturday included Prince Miteb bin Abdullah, head of the elite Saudi national guard and a favored son of King Abdullah, who died in 2015 and was the predecessor of the current king.

Miteb "was important because he was the only prince who remained inside the government who could potentially oppose MBS," Lacroix said. With Miteb's removal from his post on Saturday, Prince Mohammed "finished the job of excluding all the competing royal factions," he said.

The reasons for Alwaleed's arrest were not immediately clear. The prince, who is the founder of the business conglomerate Kingdom Holding and one of the world's most prominent investors, had been supportive, at least publicly, of the Saudi leadership, including its controversial intervention in Yemen's civil war.

His detention — along with a number of other business tycoons — suggested that the Saudi leadership was sending a message that something fundamental had changed, Lacroix said.

In the past, Saudi Arabia "would allow the existence of powerful people or fiefdoms, as long as they remained loyal in the general sense," he said. "Loyalty is no longer enough. Mohammed bin Salman doesn't want to allow the existence of those fiefdoms."

But Hesham Alghannam, a Saudi political analyst and a nonresident fellow at the King Faisal Center for Research and Islamic Studies, said that Saudi citizens were demanding fundamental change, including strong anti-corruption measures.

"People need to see that there is accountability," he said. "The immediate goal is to boost domestic and international confidence in the Saudi economy."

Beyond that, he said, "we are witnessing a move from a patriarchal system to a modern system with a new social contract."

A royal decree, carried Saturday on the website of the Saudi state news agency, said the crown prince would lead a new committee that had been granted broad powers to root out public corruption, including the ability to issue arrest warrants, impose travel bans and freeze bank accounts.

But the scale of the challenge from corruption defies easy solutions, since it is "essentially a structural feature of the economy" in Saudi Arabia, according to Christian Henderson, a professor at Leiden University in the Netherlands who specializes in the economies of the Middle East.

He described a complex ecosystem in which royal family members often benefit from state contracts and then distribute wealth to their own patronage networks. "Trying to tackle corruption and ensuring that this doesn't eat into your legitimacy, and the stability of the regime, is very difficult," he said, adding that the detentions appeared to be part of a political purge, rather than aimed at curbing graft.

"If you are interested in encouraging investment, this seems a strange way of doing it," he added. "Making these sudden moves. I don't think it's going to do much to create confidence."

Read more:

Billionaire Saudi prince tweeted that he would reward bombers with Bentleys

Demands by Saudi-led Arab states for Qatar include shuttering Al Jazeera

Saudi government says it will allow women to drive

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news