Saudi Arabia has ended an anti-corruption drive launched in November 2017 that saw senior princes, ministers and prominent businessmen rounded up.
The Royal Court said a committee led by Crown Prince Mohammed bin Salman had recovered $107bn (£81bn) in settlements including property, companies and cash.
A total of 381 individuals were summoned by the commission.
Eighty-seven agreed to settle, eight refuse and 56 were denied settlements because of already existing charges.
The Royal Court did not identify them, but those reported to have been released include the billionaire investor Prince Alwaleed bin Talal and Prince Miteb bin Abdullah, a son of the late King Abdullah.
Many of the detainees were initially held at the Ritz-Carlton hotel in Riyadh.
What prompted the anti-corruption drive?
Prince Mohammed, the 33-year-old son of King Salman, said in November that his country had "suffered a lot from corruption" since the 1980s and that experts had calculated that "roughly 10% of all government spending was siphoned off by corruption each year, from the top levels to the bottom".
"My father saw that there is no way we can stay in the G20 and grow with this level of corruption," he told the New York Times.
"In early 2015 [after he acceded to the throne], one of his first orders to his team was to collect all the information about corruption - at the top... They came up with about 200 names."
On Wednesday night, a Royal Court statement said the king had been informed by the anti-corruption committee that it had "completed its objective" and wished to conclude its activities.
The king approved the committee's request, but stressed that Saudi Arabia would "continue its efforts to preserve integrity, combat corruption and empower law enforcement and other relevant state bodies so that they are able to effectively practise their role in preserving public funds".
Who was detained?
Prince Miteb bin Abdullah - the chief of the National Guard and the most politically influential royal involved - was freed at the end of November 2017 after agreeing a settlement officials said was worth more than $1bn.
In January 2018, Prince Alwaleed bin Talal was released after reaching what he called "a confirmed understanding between me and the government".
Several other businessmen were reportedly freed in recent weeks, including Saudi-Ethiopian tycoon Mohammed Hussein al-Amoudi. It was not clear if he agreed a settlement.
It is unclear where those facing prosecution are being held. It is thought they were moved to prisons after the Ritz-Carlton reopened in mid-February. Some of detainees were reportedly tortured at the hotel, which the government denies.
What has been the impact of the crackdown?
The purge of the kingdom's elite was a huge shock to the system, BBC Arab affairs analyst Sebastian Usher says. It also unsettled some foreign investors.
Our correspondent adds that the Saudi government must now hope that drawing a line under the purge will convince investors it is safe to put money into the kingdom. According to the UN, foreign investments totalled $3.5bn last year, double what it was in 2017 but down from $12bn in 2012.
Prince Mohammed has rejected as "ludicrous" suggestions that the anti-corruption campaign was a power grab. He said many of those detained had pledged allegiance to him when he was named first in line to the throne in June 2017.
The crown prince's reputation has also been tarnished by the murder of the journalist Jamal Khashoggi, a prominent critic, - inside the Saudi consulate in Istanbul in October, as well as by Saudi Arabia's role in the war in Yemen.