In this June 22, 2018 photo, women and their children enjoy the entertainment at a road safety event for female drivers launched at the Riyadh Park Mall in Saudi Arabia. (AP Photo/Nariman El-Mofty)

In this June 22, 2018 photo, women walk at a road safety event for female drivers launched at the Riyadh Park Mall in Saudi Arabia. (AP Photo/Nariman El-Mofty)

In this June 22, 2018 photo, women ride go carts at a road safety event for female drivers launched at the Riyadh Park Mall in Saudi Arabia. (AP Photo/Nariman El-Mofty)

In this June 22, 2018 photo, women wait in line to ride go carts at a road safety event for female drivers launched at the Riyadh Park Mall in Saudi Arabia. (AP Photo/Nariman El-Mofty)

In this June 22, 2018 photo, a woman tests a car driving simulator at a road safety event for female drivers launched at the Riyadh Park Mall in Saudi Arabia. (AP Photo/Nariman El-Mofty)

In this June 22, 2018 photo, a woman drives a go cart at a road safety event for female drivers launched at the Riyadh Park Mall in Saudi Arabia. (AP Photo/Nariman El-Mofty)

In this June 22, 2018 photo, women watch a video on driving at a road safety event for female drivers launched at the Riyadh Park Mall in Saudi Arabia. (AP Photo/Nariman El-Mofty)

In this June 22, 2018 photo, women wait in line to ride go carts at a road safety event for female drivers launched at the Riyadh Park Mall in Saudi Arabia. (AP Photo/Nariman El-Mofty)

In photo taken June 22, 2018 photo, women wait in line to ride go carts at a road safety event for female drivers launched at the Riyadh Park Mall in Saudi Arabia. (AP Photo/Nariman El-Mofty)

In this June 22, 2018 photo, a woman tests a car driving simulator with her son at a road safety event for female drivers launched at the Riyadh Park Mall in Saudi Arabia. (AP Photo/Nariman El-Mofty)

RIYADH, Saudi Arabia (AP) — Outside a sprawling mall in the Saudi capital, Riyadh, young single men and women walk through an open-air exhibit where Saudi women and traffic police explain the ins and outs of handling a car. Children take a lap around a makeshift course in tiny electric cars as clowns appear on a small stage, dancing for the crowd. A song with a woman's voice blares through the loudspeakers, singing: "I love you Saudia. My love, Saudia."

Just four years ago, this government-sponsored event was an unthinkable scene in the deeply religious and socially conservative country.

But the most visible sign of change came on Sunday, when women in Saudi Arabia were allowed to drive, ending a ban that had stained the kingdom's reputation globally, kept women subjugated in the backseat and hindered the full potential of the country's economic growth.

The move places Saudi women at the heart of a major transformation being spearheaded by the country's Crown Prince Mohammed bin Salman. It also places women at the center of a tug-of-war between those agitating for more openings and a religious majority that remains wary of changes that could be influenced by the West.

It was only a few years ago that religious police— known for their long beards and shorter white robes— enforced an austere interpretation of Islam that banned music of any kind in public, much less the sound of a woman's voice on loudspeakers. They could detain groups of unmarried men and women for simply standing around or sitting together. They ensured restaurants and stores closed their doors for daily prayers and waved sticks at women who had their hair or face uncovered, shouting through microphones attached to the tops of their cars as they patrolled the streets.

Unlike previous Saudi monarchs who took cautious, incremental steps to reform the country, King Salman has granted his 32-year-old son and heir, the crown prince, a free hand to usher in dramatic moves that are reshaping the country. Allowing musical concerts, opening movie theaters, easing restrictions on gender segregation and reigning in the powers of the religious police have all been signature reforms of the young prince.

He's seen as the force behind the king's decision to lift the longstanding ban on women driving this Sunday.

"I can say that Mohammed bin Salman, the crown prince, came at the right time. He is young and motivated," said Lulwa al-Fireiji, speaking at Friday night's event to encourage women to drive.

Al-Fireiji, 60, quickly clarified that while there was "nothing wrong" with previous Saudi rulers, now is the time for change.

"I will get a license, but I won't drive right away because the elders are always scared. But the young people are motivated and we need at this time someone like Mohammed bin Salman - motivated, God bless him, and daring. He will move the country (forward) faster," she said.

Granting women the right to drive is part of a wider blueprint for the future drawn up by the crown prince. In an era of sustained lower oil prices, the government is pushing Saudis to become less reliant on the government for jobs, handouts and subsidies. Some 70 percent of Saudis who work are employed in the public sector and rely on the government for their wages.

Official statistics show that women make up the overwhelming majority of job seekers in Saudi Arabia and that around 34 percent of Saudis seeking employment are between 25 and 29 years old.

The state alone cannot create enough public sector jobs to keep up with the pace of Saudis seeking work, so foreigners are being booted out of jobs at restaurants, banks, cell phone repair shops and many sales floors to make way for Saudis. Companies are required to stack their workforce with a minimum number of Saudi nationals or face heavy fines.

To encourage two-income households, Saudi women are taking on jobs that were once reserved for men at lingerie shops and makeup stores. And Sunday, when they start driving, many will be able to get more easily to work and will no longer need to hire drivers, who often hail from India and Pakistan. Women will even be allowed to work as drivers.

Prince Mohammed is set to inherit a country where more than half of its 20 million citizens are under the age of 25. Many are active on social media, where Saudis are vocal about the pace of change.

Just last week, conservative citizens took to YouTube and Twitter to criticize a Russian circus that included female performers in body-hugging leotards. Before the show could finish its four-day run in Riyadh, the king had fired the head of the entertainment authority.

Under the crown prince, the message pushed by officials is that Saudi Arabia is modernizing, not Westernizing. The prince has branded the reforms as a return to "moderate Islam". Even the country's ultraconservative clerics, who for decades warned against allowing women to work and drive, have toed the line with muted statements of support.

The tightrope the government has to walk between "a shrinking insular and traditionalist majority and a growing progressive and internationalist minority" is a defining feature of modern Saudi Arabia, said a report by the Arabia Foundation, a Washington-based think tank that has links with the Saudi government.

The report said the government maintains a delicate balance between reformers and conservatives by "monopolizing the reform process", pre-empting and suppressing grassroots activism or, on occasion, tolerating it as a safety valve for expressing grievances.

Just last month, the pendulum appeared to swing away from the latter when several prominent women's rights activists who were at the forefront of calls to lift the driving ban were arrested. At least 10 are still being held in an undisclosed location with no access to lawyers.

The arrests highlight how quickly the levers of reform can be pulled back.

"It looks like the only reform they want is the one that comes from above and any sort of calls for changes, no matter how positive they are and will benefit the country, will not be tolerated from below," said Kareem Chehayeb, a researcher at Amnesty International.

Three of the women still detained— Aziza al-Yousef, Loujain al-Hathloul and Eman al-Nafjan— are seen as icons of a larger democratic and civil rights push in the kingdom. The women had also been calling for an end to guardianship laws that give male relatives final say over whether a woman can marry, obtain a passport or travel abroad.

Since their arrest, the women have been branded traitors by state-aligned media. Prosecutors accuse them of working with foreign entities and attempting to harm the interests of the kingdom.

It comes after Prince Mohammed oversaw the arrests of dozens of writers, moderate clerics and others last year for apparently not emphatically supporting his policies, including the Saudi-led war in Yemen and a standoff with Qatar. In November, he further consolidated power when he arbitrarily detained influential businessmen, officials and at least a dozen high-level princes in a purported anti-corruption campaign.

The arrest of the women's rights activists just before women are allowed to drive sends a message that "you are subjects and not citizens" and that the Saudi leadership alone controls when and how change takes shape, said Kristin Diwan, a senior resident scholar at the Arab Gulf States Institute in Washington.

"You could get the idea that OK now we're allowing driving and allowing a real opening, but that kind of encourages women to demand and ask for more," she said. "I think they want to make sure that that is not the message they're communicating. You cannot make demands on the government. The government will decide what policies are best."