WASHINGTON — The Ritz-Carlton in Saudi Arabia's capital bills itself as an "elegant oasis" that "completely envelops its discerning guests in majestic surroundings."

But a year ago Sunday, on Nov. 4, 2017, the ultra-luxurious Riyadh hotel — with its marble floors and vast indoor swimming pool — became a gilded prison, when hundreds of Saudi royals, billionaires and senior government officials were detained in an extraordinary power play by the heir to the throne, Crown Prince Mohammed bin Salman.

The involuntary guests were told they had to sign away large chunks of their assets to be released. The detention involved both psychological abuse and — in some cases — torture, current and former U.S. officials say.

The move, described by Saudi authorities as a crackdown on rampant corruption, allowed the crown prince to tighten his grip and sent a shock wave through the kingdom's elites.

"This was a shakedown operation and a power consolidation operation," said one former senior U.S. official who was in office at the time.

The Ritz detentions were designed "to remind people going forward that their wealth and their well-being would depend on the crown prince and not anything else, which is why it was so upsetting for many in the royal family," said the former official, who spoke on condition of anonymity.

A year later, the event has taken on even more importance in the wake of the death of the Saudi writer Jamal Khashoggi, who was murdered after entering the Saudi consulate in Istanbul on Oct. 2. Bin Salman is suspected of ordering Khashoggi's death, and is struggling to defuse the crisis that has put the country's international standing in jeopardy.

If bin Salman survives the fallout over the killing of Khashoggi, it will be in part due to the roundup at the Ritz, when he crushed his rivals and potential opponents. Some of those targeted included royals or officials linked to the late King Abdullah, who died in 2015. His relatives and associates are distrusted by the circle around King Salman, who now holds the throne.

But the crackdown generated deep resentment in the House of Saud and numerous enemies, experts and former officials said, and the crown prince could face more resistance from his internal adversaries. Bin Salman, keenly aware that Saudi Arabia's King Faisal was murdered by a disgruntled nephew in 1975, devotes elaborate attention to his personal security, one former U.S. intelligence officer told NBC News.

The details of exactly what happened to those detained at the Ritz have remained shrouded in secrecy, and the fate of those still held also remains unclear. A second hotel, the Courtyard by Marriott, located just across the street from the Ritz, was also used as a high-end detention center when space ran out at the Ritz. Both hotels were closed to the public during the operation. The Ritz did not respond to a request for comment.

A U.S. intelligence official and two former senior U.S. government officials told NBC News that the detainees were coerced, abused and tortured. The sources, who spoke on condition of anonymity, declined to divulge details, which were contained in classified intelligence reports.

The detainees were deprived of sleep, beaten and interrogated with their heads covered. Seventeen were hospitalized, according to the New York Times.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

One detainee, a Saudi military officer, Maj. Gen. Ali al-Qahtani, died in custody. The Saudi authorities have yet to offer an official explanation in the case. He was a top aide to Prince Turki bin Abdullah, a son of the late King Abdullah.

Saudi Arabia has denied that any abuse or torture took place during the detentions. The Saudi embassy in Washington did not respond to requests for comment.

At the time, President Donald Trump endorsed the crackdown in a tweet: "I have great confidence in King Salman and the Crown Prince of Saudi Arabia, they know exactly what they are doing. Some of those they are harshly treating have been 'milking' their country for years!"

Trump’s tweet came on Nov. 6, two days after the crackdown came to light. The next day the State Department said it would like to see prosecution of corruption in a “fair and transparent manner.”

I have great confidence in King Salman and the Crown Prince of Saudi Arabia, they know exactly what they are doing.... — Donald J. Trump (@realDonaldTrump) November 6, 2017

Trump's apparent approval of the operation raises the question of whether Washington missed an opportunity to make clear to the crown prince last year that he needed to ease off of authoritarian measures or else risk a U.S. backlash, said a former senior government official with experience in the region:

"It should have been a warning to us where this was going," said the former official.

Among the nearly 400 detainees was Prince Alwaleed bin Talal, a high-profile tycoon with investments in Citigroup and Apple, estimated to be worth more than $17 billion.

Alwaleed was summoned to the royal court in the early morning hours of Nov. 4, having no inkling the crown prince had launched a sweeping roundup of the country's most powerful and wealthy figures.

Alan Bender, a Canadian businessman with ties to the Saudi royal family, told NBC News he represented an ex-wife of Alwaleed, who had alleged she was mistreated by the billionaire. Before the November roundup, Bender had been pressing Alwaleed's lawyers to pay his client a financial settlement. After Alwaleed was detained, Bender was flown to Riyadh to "testify" against the prince. Bender said he did so via video-conference, reading a script of allegations while Alwaleed sat in an undisclosed location on the other end of the video chat.

Bender said it appeared that Alwaleed was in a room that resembled a jail cell, rather than a hotel suite. He also said al-Waleed seemed to be in rough shape, fatigued, unshaven and twitching.

"He looked like he hadn't slept," Bender said.

While in Riyadh, Bender said, he learned more about the Ritz operation.

Bender said that a top adviser to the crown prince named Saud Al Qahtani "bragged to me that they slapped and hung some detainees upside down." That same adviser has since been sacked, along with other top officials, after the killing of the Saudi dissident Khashoggi.

Alwaleed was finally released after 83 days, looking underweight. In an interview with Bloomberg Television, Alwaleed insisted he was not mistreated and that he and the Saudi government had come to a "confidential" understanding. The prince did not respond to requests for comment by NBC News.

Last month, Alwaleed appeared at an investment summit in Riyadh, with footage showing him sitting just a few seats away from the crown prince.

Saudi businessman Prince Alwaleed bin Talal, left, with Saudi Crown Prince Mohammed bin Salman, second right, at the Saudi Arabia's investment conference, in Riyadh on Oct. 23, 2018. Fares Ghaith / EPA

After the Ritz crackdown wound down, most remaining detainees were moved to Al Hayer jail, former U.S. officials said.

Some of the former detainees have been placed under house arrest, are required to wear ankle monitors or are banned from travelling abroad, the former officials said.

The Saudi attorney general's office said in a statement in January that 381 individuals had been "subpoenaed" in corruption cases and 56 would remain in custody, because they "refused to settle" or they were subject to other pending criminal cases.

Saudi Prince Miteb bin Abdullah, son of the late King Abdullah and head of the National Guard, a powerful 100,000-strong security force charged with protecting the royals, was released after three weeks in detention and after he reportedly agreed to pay more than $1 billion in a settlement.

His brother, Prince Turki bin Abdullah, a former governor of Riyadh province, remains under detention, the former officials said.

The Saudi government portrayed the whole clampdown as a successful effort to clean up corruption. Saudi authorities said in January that the government had reached settlements worth $106 billion. It's not clear how much of that is in the form of cash, and how much in real estate or other holdings, which could take months or years to transfer.

The government reportedly seized the management of some firms, including Saudi Binladin Group, the giant construction company founded by Osama bin Laden's father. The chairman, Bakr bin Laden, was among those detained last year. The company did not respond to requests for comment.

Even before the Ritz detentions, the crown prince's impulsive ways had sparked jitters among foreign investors and the country's wealthy elite. Foreign direct investment has plunged in the past two years and Saudis have moved cash and assets out of the country at a dramatic rate.

The Ritz detentions only reinforced concerns for businesses looking at the Saudi market.

"The takeaway was if you get on the wrong side of this guy, then your investments and your deal could be at risk. That's a chilling message," said Phillip Cornell, a senior fellow at the Atlantic Council think tank and former adviser to the kingdom's state-owned oil giant Saudi Aramco.