Investment fell, in part, because of concerns about how the kingdom — which increasingly means Prince Mohammed — confronts problems. In fall 2017, hundreds of Saudi businessmen and princes were detained, essentially under house arrest, at the Ritz-Carlton Hotel in Riyadh and other locations amid corruption allegations.

About a dozen female activists were arrested in May for campaigning for broader rights, including driving. Some are still being held on “suspicion of harming Saudi interests,” and their court hearings have been delayed multiple times, including this week.

“Things certainly got worse after the fall of 2017 and have not significantly improved,” said Karen Young, a resident scholar at the American Enterprise Institute in Washington, referring to investment levels.

But the promise of Saudi Arabia, which saw oil prices rise by a third this year to about $71 a barrel for Brent crude, has been too rich for many big companies to pass up. Google, JPMorgan Chase and the Japanese technology giant SoftBank are among the businesses that have kept Saudi Arabia as a partner.

“We thought long and hard, and concluded that the best course of action was to go forward,” Adam Aron, the chief executive of AMC, said in an interview, describing his company’s decision to open at least 40 new theaters there over the next five years.

“It’s the right thing to do for the people of Saudi Arabia,” he said this month. “They have been deprived of going to the movies for decades.”