On a packed night at Al Comedy Club in the Red Sea port city of Jidda, as Saudi Arabia was preparing to allow women to drive, a performer asked the women in the audience what cars they intended to buy.

“Maserati,” one called out. “Mercedes,” said another.

“Just like that? First car a Maserati?” the male comedian fired back. “You ask a guy what he wants to get, he’ll say a Hyundai. That’s because he’s paying for it!”

Servers in flowing robes and red caps navigated the aisles of the small theater, passing out bags of popcorn and chocolate bars to the young audience members, many of whom were taking pictures with their cellphones to share on Instagram and Snapchat.

Six years ago, just getting permission to open the club was a milestone, according to the owner, Yaser Bakr. Live stand-up comedy didn’t exist in the country, and government bureaucrats were distrustful of anything new.

“They didn’t know what it was,” Bakr said. “So you don’t only have to ask for a permit, you also have to explain what it is, and why is this guy on stage talking about his childhood and his mother.”

Now a new government agency that regulates nightlife and entertainment — aptly named the General Entertainment Authority — is offering him financing and asking how it can help Al Comedy Club expand to more cities.

“It’s almost a 180-degree shift,” Bakr said.

The change is part of a sweeping modernization drive led by Crown Prince Mohammed bin Salman, who wants to offer the country’s 32 million people something that was never a high priority here: fun.

Saudi Arabia has long been regarded as one of the most austere Islamic nations, where shows and movie theaters were mostly forbidden, and the feared religious police enforced strict gender segregation in public places. The rules, however, are being relaxed as the 33-year-old heir to the Saudi throne pushes his agenda and hard-line clerics lose some of their power.

Thousands of comic book and pop culture fans, many of them in costumes and face paint, flocked to Jidda’s second Comic-Con festival in March.

The first new cinema in more than 30 years opened in the capital, Riyadh, in April with a gala screening of the Hollywood blockbuster “Black Panther.” The same month, the prince and his father, King Salman, broke ground on a new entertainment complex outside Riyadh — described as 2½ times the size of Disney World — that will offer auto racing, indoor ski slopes, water parks and a Six Flags theme park.

The Greek-born pianist and composer Yanni performed in the kingdom in December. Cirque du Soleil is set to stage its first show there this month — in costumes tailored to conform to the country’s conservative mores.

The new offerings are part of an ambitious plan, dubbed Saudi Vision 2030, to diversify an oil-dependent economy, lure outside investment and create jobs for the growing number of young people entering the workforce.

Saudis spend billions of dollars every year on leisure activities abroad. By expanding the country’s entertainment options, the government hopes to entice citizens to spend more of that money at home and draw more visitors.

The injection of fun could also help blunt public frustration over painful new austerity measures, including taxes and hikes in domestic fuel prices, which used to be heavily subsidized. The slump in world crude oil prices since 2014 has produced yawning budget deficits, hurting the monarchy’s ability to provide the government jobs and lavish benefits to which many Saudis have grown accustomed.

Splashy events may serve another purpose for the prince: deflecting attention from his efforts to consolidate power and silence critics. The recent social and economic reforms, including the reversal of a long-standing ban on women driving, have not been accompanied by any political opening in the country, which is governed by an absolute monarchy.

Iman al Dabbagh / For The Times

Visitors at a pirate-themed street festival in Jidda, Saudi Arabia, dubbed Land of O'hara.

Visitors at a pirate-themed street festival in Jidda, Saudi Arabia, dubbed Land of O'hara. (Iman al Dabbagh / For The Times)

Overseeing a massive public and private investment in the entertainment sector is the General Entertainment Authority, which was created in May 2016 and plans to stage more than 5,000 events this year, double the number in 2017.

Dozens of new businesses have sprung up to meet the demand for more shows and festivals. The authority offers them funding and training. It has also taken steps to streamline a cumbersome bureaucracy that once required organizers to obtain permits from as many as a dozen government offices to stage events.

“We’re like the one-stop shop,” said Faisal Bafarat, the authority’s chief executive. “You just apply to us. We get you all these approvals.”

The applications are submitted online and can usually be processed within 48 hours, he said. The authority will then assign a project manager to ensure the event is of a high standard and conforms with the kingdom’s regulations and values.

One challenge: finding qualified people to staff the authority. Saudi universities don’t offer much on the subject of entertainment. Bafarat himself studied mechanical engineering at San Francisco State University and used to be a deputy governor of the Saudi General Investment Authority.

The easing of the kingdom’s rigid social strictures has won the crown prince enthusiastic support among Saudis under the age of 30, who make up about two-thirds of the population. Many were exposed to world-class entertainment while traveling or studying abroad and are thrilled to be able to enjoy similar events at home.

“Before it felt like a group of conservative, malicious people was controlling the life of everyone else,” said Esra Alhabshi, 25, who does research on renewable energy technology for the state oil giant, Saudi Aramco. “That isn’t the case anymore…. It just feels like there is someone to fight for you now.”

On a warm Saturday evening, she joined friends at the recently revamped Jidda waterfront for the last night of a pirate-themed festival, featuring five stages of live music and dance, flashing lasers, a haunted maze, amusement park rides and food trucks.

The group, which included men and women who met at university in Canada, sat at a picnic table chomping on burgers while listening to a local jazz band perform its version of the hit song “Despacito.”

On a nearby stage, a troupe of hip-hop dancing pirates launched into the routine from Michael Jackson’s “Thriller” video, drawing squeals of delight from the women in the audience, many of them wrapped in traditional black robes and face-covering veils.

It was a stark contrast to just a year ago, when a night out for Alhabshi usually meant dinner or window shopping at one of Saudi Arabia’s ritzy malls. More often, she stayed home and watched Netflix.

“There was basically nothing to do,” she said.

Iman al Dabbagh / For The Times

Men and women mix freely in the food truck section at the Land of O'hara festival in Jidda, Saudi Arabia.

Men and women mix freely in the food truck section at the Land of O'hara festival in Jidda, Saudi Arabia. (Iman al Dabbagh / For The Times)

Still, not everybody is a fan of the new environment. The country remains deeply conservative, and even some younger Saudis are uncomfortable with the pace and scope of change.

In June, the chairman of the entertainment authority, Ahmed Khatib, was abruptly removed after critics went on social media to denounce a Russian circus performance featuring women in figure-hugging costumes, the pro-government news site Sabq reported.

Others who embrace the changes worry that the prince could be inviting a backlash from members of the ultraconservative Wahhabi religious establishment, which confers legitimacy on the ruling family. Clerics who opposed the prince’s social reforms have been detained and the religious police stripped of their power to arrest people.

“I love the vision, but I think they are moving too fast,” said a 35-year-old mother of two who asked to be identified by a traditional nickname, Um Ahmed, out of fear that she might be seen as critical of the monarchy.

She worries that her country is losing its distinct cultural identity and wants to turn itself into another Dubai, with its slick bars and more liberal dress code.

“It’s weird for us, because we were raised with all these don’ts,” she said. “Suddenly, there are laser shows, mixed [gender] festivals, gays out in the open.

“Awesome, but I’m worried about the Saudis who are very, very religious,” she continued. “They are quiet now, but for how long are they going to stay quiet?”

At Al Comedy Club, long lines form every Thursday night, the start of the Saudi weekend.

The government recently certified the club as a venue for families, meaning that men and women there no longer have to enter through separate doors or sit in separate sections.

Some things haven’t changed, though: There is no alcohol on offer. Instead, patrons sip cappuccinos.

“I’ve performed in the States, and I have to tell you it’s a little bit easier to be funny when the audience has already consumed their two-drink minimum,” Bakr said.

“That doesn’t mean that we can’t joke about religious hypocrisy. We do it all the time,” he said. “It doesn’t mean that we can’t joke about government bureaucracy. We do that all time. And that doesn’t mean that we cannot joke about sexual tension.”

At a recent show, Bakr poked fun at the country’s dour image.

“Too much smiling will get you into trouble in Saudi Arabia,” he said grimly. “McDonald’s Happy Meals in Saudi Arabia are not called Happy Meals. They are called ‘Meals for Small People’ — with no toy. Toys are so much fun.”

The crowd burst into laughter.

CAPTION

Former President George H.W. Bush's casket will be taken by train later this week to the city of College Station, home to Bush's presidential library at Texas A&M University, where Bush will be buried. The locomotive bears the number "4141" in honor of the 41st president.

Former President George H.W. Bush's casket will be taken by train later this week to the city of College Station, home to Bush's presidential library at Texas A&M University, where Bush will be buried. The locomotive bears the number "4141" in honor of the 41st president.

CAPTION

Former President George H.W. Bush's casket will be taken by train later this week to the city of College Station, home to Bush's presidential library at Texas A&M University, where Bush will be buried. The locomotive bears the number "4141" in honor of the 41st president.

Former President George H.W. Bush's casket will be taken by train later this week to the city of College Station, home to Bush's presidential library at Texas A&M University, where Bush will be buried. The locomotive bears the number "4141" in honor of the 41st president.