An anti-corruption investigation in Saudi Arabia that resulted in the detention of dozens of princes, ministers and business owners, as well as the recovery through settlements of more than $100 billion, has come to an end, the Royal Court said.

Many of the people arrested during the sweep, which began in 2017, were held at the Ritz-Carlton hotel in Riyadh. Many were released after making financial settlements. Nearly 90 of the defendants opted to settle, eight declined and 56 were ineligible to settle, BBC reported. In all, 381 people were interrogated during the investigation.

The investigation was spearheaded by Crown Prince Mohammed bin Salman, who has been linked to the murder of Washington Post columnist Jamal Khashoggi inside the Saudi consulate in Istanbul in October.

Before his killing, Khashoggi had written critically of the crown prince's crackdown on critics. The U.S. Senate has blamed the killing on the crown prince. The kingdom, however, denies he had any role.

GROUND ZERO ART EXHIBIT FEATURING SAUDI FLAG TO BE REMOVED FROM SITE, OFFICIALS SAY

The billions recovered came in the way of property, businesses and cash, the BBC reported.

The sweep helped cement the crown prince's powerful status. Analysts and critics said it was also a way for the prince to sideline potential rivals and consolidate power as he prepares to inherit the throne from his father, King Salman.

Among those held was billionaire Prince Alwaleed bin Talal, who was detained for more than 80 days at the Ritz-Carlton in Riyadh before his release. Also, held were the sons of the late King Abdullah, including Prince Miteb who'd commanded the National Guard and was once seen as a contender for the throne.

There were also current and former ministers rounded up and billionaire businessmen like Bakr Binladin, chairman of the kingdom's pre-eminent contractor the Saudi Binladin Group that had secured a near-monopoly on mega-expansion projects in Islam's two holiest sites, Mecca and Medina, throughout the reigns of successive Saudi monarchs.

Prince Mohammed called the assertions “ludicrous” that the anti-corruption sweep was basically a power grab, according to the BBC. He argued that many of the people arrested had vowed to be loyal to him when was about to ascend to power.

Guards were positioned outside the detainees' hotel rooms, where some had access to room service and satellite TV. Others were reportedly abused, and many were placed under travel bans after their release.

It's unclear who exactly is still being held or where they are being held. The Ritz-Carlton opened to the public again in mid-February and it's believed those still detained were moved to prisons or guesthouses.

Altogether, those rounded up by the crown prince symbolized the elite structure encircling the ruling Al Saud family and its vast patronage networks.

GRAHAM: SAUDIS WOULD BE 'SPEAKING FARSI IN ABOUT A WEEK' WITHOUT US SUPPORT AGAINST IRAN

The Royal Court announcement, carried on Saudi state TV, said that 56 people continue to be investigated and that the attorney general refused to settle with them due to other criminal charges they face.

The government never officially disclosed the names of those ensnared in the campaign, but state-linked media distributed lists with names of some of those detained.

The government also did not disclose details on the allegations the detainees faced or how they were being prosecuted, leading to concerns about transparency and due process.

CLICK HERE FOR THE FOX NEWS APP

International investors were initially spooked by the lack of transparency and clarity.

Two months before the anti-corruption campaign was launched, the crown prince had begun his first sweep of arrests targeting dozens of prominent Saudi figures, including moderate clerics, for not publicly supporting or for criticizing his domestic and foreign policies.

Then, in May of last year, more than a dozen women's rights activists and their supporters were arrested just before the kingdom lifted its ban on women driving. Some have reportedly been water-boarded, lashed, sexually assaulted and electrocuted.

The Associated Press contributed to this report.