A man watches the sun setting over Dhiriyah, a UNESCO World Heritage site that includes a 17th-century fortress, mosques and clay-colored structures just outside of Saudi Arabia's capital of Riyadh on Sunday, Dec. 16, 2018. (AP Photo/Karin Laub) Karin Kaub

In this Dec. 15, 2018 photo, electric cars are powered before one of the races at the Formula-E held on the outskirts of Riyadh, Saudi Arabia. A Formula-E car race and concerts where men and women mingle freely epitomize the reform agenda of Saudi Crown Prince Mohammed bin Salman. But there’s a hard limit to the reforms _ as revealed by the brutal killing of Saudi critic and writer Jamal Khashoggi by Saudi agents close to the crown prince in October and the reported torture of five women’s rights activists in detention. The crown prince presides over a nation where he alone defines the pace and scope of change. (AP Photo/Aya Batrawy) Aya Batrawy

Hostesses in black robes and headscarves give instructions to foreign visitors trying out a simulator at a Formula-E race on the outskirts of Riyadh, Saudi Arabia on Saturday, Dec. 15, 2018. Men and women mingled freely during the event, a scene that would have been unthinkable in the ultra-conservative kingdom until recently. (AP Photo/Karin Laub) Karin Laub

Women, some without headscarves, drove themselves to a Formula-E car race where thousands of young Saudis and hundreds of international visitors partied into the night at concerts by Enrique Iglesias, The Black Eyed Peas and DJ David Guetta.

It’s a vision of Saudi Arabia that epitomizes Crown Prince Mohammed bin Salman’s top-down reform efforts. The spectacle would have been unthinkable until recently in the ultra-conservative kingdom where religious police used to enforce strict gender segregation, scolded women for not covering their hair and barged into restaurants to demand music be turned off.

The concerts and car race cap several months of profound change in Saudi Arabia, including the opening of the first movie theater in April and the lifting of the world’s only ban on women driving in June.

But there’s a hard limit to the reforms – as revealed by the brutal killing of Saudi writer Jamal Khashoggi by Saudi agents close to the crown prince in October and the reported torture of several women’s rights activists in detention. While the arena for fun is widening, the space for political engagement and dissent has virtually disappeared.

The 33-year-old crown prince, backed by his father King Salman, presides over a nation where he alone defines the pace and scope of change.

It’s difficult to gauge the prince’s domestic popularity, given the reservations and fear many have of criticizing the leadership. But his reforms are popular among young Saudis who believe their cities should offer some of the glitz and entertainment of neighboring Dubai or Abu Dhabi.

“This is a major change in Saudi Arabia and we are proud of it,” said Abdelrahman al-Mahmoud, 29, a spectator at the electric car race in the capital, Riyadh. He expressed pride in a nation he feels is finally coming into its own.

When asked about the crown prince, al-Mahmoud described him as “the most popular guy” in Saudi Arabia. Pressed for his thoughts on Khashoggi’s killing, he tensed up, like other Saudis interviewed at the race, and said he came to enjoy the day and didn’t want to discuss politics.

The death of Khashoggi, who was killed and dismembered inside the Saudi consulate in Istanbul, seemed a world away from the carefree atmosphere at the race last weekend where concert-goers belted out “Long live Salman” to house beats remixed by Guetta, the DJ.

Meanwhile, on the other side of town, three prominent women’s rights activists are being held in Riyadh’s Ha’ir Prison. They were arrested in May, enduring abuse and torture at the hands of masked interrogators in the Red Sea city of Jiddah before being transferred to Riyadh this month.

The women, among more than a dozen female activists being held, were whipped and caned on their backs and thighs, and electrocuted, according to five people with knowledge of their treatment. All spoke on condition of anonymity for fear of reprisal and to protect personal details about the detainees.

They said some of the women were forcibly touched and kissed, at least one was water-boarded and one attempted suicide during confinement. They said one woman was threatened with being raped, killed and dumped in a ditch, allegedly by a senior official wearing a mask. The detainee purportedly recognized him by some of his features.

The allegation could not be confirmed independently.

The government has denied charges of abuse as “wild claims” that are “simply wrong.”

The arrest of women’s rights activists, accused of vague national security crimes, was one of the incongruities in the reform agenda that Khashoggi wrote about in Washington Post columns before he was killed.

The kingdom denies the crown prince knew of the plot. He’s been supported by President Donald Trump who has touted U.S.-Saudi ties. The U.S. Senate, however, passed a unanimous resolution saying it believes the crown prince is to blame for the murder. His critics point to U.S. intelligence reports and say an operation like this could not have happened without his knowledge.

The killing badly damaged Prince Mohammed’s international image as a transformational leader committed to changes Saudi Arabia’s allies in the West long hoped for.

Those changes are being promoted cautiously at home.

While the English-language Saudi newspaper Arab News touted the Formula-E as a “coming of age” event for the reform agenda, the more widely seen Arabic-language state TV channel only briefly carried images of the crown prince at the race and did not show the concerts or women without headscarves – images that much of the Saudi public strongly disagrees with.

For 22-year-old Maram Ali, who normally wears a headscarf in public, the race was a rare chance to literally let her hair down. Like many women at the event, she kept the required loose-fitting robe, known as an abaya, on but walked around without a head-covering.

“These changes should have happened a long time ago,” she said, crediting the crown prince. “People are opening up. ... It’s not like before where we were going backward and the world outside is moving forward.”

The reform agenda is fueled in part by the need to power the economy in the face of lower oil prices. Unemployment has risen to almost 13 percent, while the cost of electricity and water have skyrocketed as subsidies are rolled back. This week, the king announced an extension of a multibillion-dollar package of monthly allowances for much of the public.

A father of two who goes by the name Abu Turki said he’s been out of work for six months after he lost his job because of company cost-cutting. He supplements his government benefits, some of which run out in six months, working as a driver for the ride-hailing app Uber.

Like many Saudis, he’d heard of the Formula-E race, but for religious reasons that for decades have been propagated in this conservative nation home to Islam’s holiest sites, he didn’t agree with the idea of unrelated men and women mixing.

Speaking from behind a black face veil, Jawaher Othman, 55, had mixed feelings. She said the cool weather encouraged her to visit the race, but she had no intention of staying for the concert.

“May God correct their path and bless them,” she said of young concert-goers. “I personally don’t agree with the concerts and it’s not for me, but it’s not up to me ban it or say anything.”