The Wall Street Journal (WSJ) noted on Thursday that Crown Prince Mohammed bin Salman (MBS) is pushing a return to “the tolerant, moderate Islam that is open to the world, to all the religions and traditions of its people” as part of Saudi Arabia’s major economic reform plan.

At the heart of Saudi Arabia’s recent cultural and political upheaval is an understanding that the country must become more compatible with the Western world and more hospitable to foreign investment, in order to manage the transition away from an oil-based economy with limitless deep pockets. Possibly the trickiest aspect of this transformation will be an Islamic reformation in the notoriously strict kingdom.

As the Journal goes on to note, MBS is looking quite a way back into history for that memory of moderate Saudi Islam, since its harsh blend of strict Wahhabi Islam was brewed up in the 18th Century by the eponymous cleric Mohammed Ibn Abd al-Wahhab. Tribal influences, and of course the presence of Islam’s holy cities of Mecca and Medina, have pushed the kingdom in an Islamist direction ever since.

The key event in recent Saudi Islamic history is often underappreciated by outside observers: the siege of the Grand Mosque in Mecca, in which militants occupied the holiest shrine of Islam for 15 days in 1979. The WSJ mentions it only briefly, but the siege dovetailed with the revolution in Iran to change both the Sunni and Shiite wings of the Islamic world.

It is best understood as a theocratic coup, and not an unsuccessful one because it permanently altered the relationship between Saudi Arabia’s royal family, secular bureaucracy, and hardline Islamist clergy. The government did much to curry favor with the Wahhabi extremists to prevent anything like the Grand Mosque attack from happening again. The most pessimistic interpretation of the aftermath is that fundamentalists effectively blackmailed the wealthy Saudi government into bankrolling extremism and terrorism. The siege made the government look weak, dishonest, and decadent to many Saudis.

The Grand Mosque terrorist incident was also a landmark moment in deteriorating relations between Saudi Arabia and Iran, and by extension Sunni and Shiite Islam, since Iran was widely believed to be involved in the attack. A dismal contest between Saudi Arabia and Iran began to demonstrate which was more pious and faithful to Islamic law. Fundamentalism spread rapidly across formerly liberal and cosmopolitan cities across the Middle East, which until the Islamist upheaval of the late Seventies resembled American and European cities of the same era. It didn’t help matters that Islamic fundamentalism mixed easily with Marxist quackery.

Some find the speed of Crown Prince Mohammed bin Salman’s reforms astonishing, or worry that he is moving too quickly, but Margherita Stancati at the Wall Street Journal recalls that fundamentalism descended upon Saudi Arabia very quickly forty years ago:

The mixing of unrelated men and women, let alone singing and dancing, was no longer acceptable. Cinemas closed and music stopped.

In public, women were forced to wear face-covering veils, which in parts of the country such as Asir had been virtually nonexistent. The religious police, formally known as the Committee for the Promotion of Virtue and the Prevention of Vice, was given the job of enforcing the new order.

Radical Islamists infused the school curriculum with the teachings of Wahhabi scholars. Textbooks instructed students to hate Christians and Jews and denigrated Shiite Muslims. Some of the more extreme views often came from teachers, who sometimes recruited students to extremist causes.

Saudi charities linked to the government helped spread that interpretation of Islam beyond the kingdom’s borders, inspiring generations of jihadists.

As Stancati notes, even young women eager for reform in Saudi Arabia today grew up being taught that drawing pictures of animals was an insult to Allah’s sacred and unique ability to create life, or that listening to music for pleasure would get them tortured for all eternity in the afterlife by having hot metal poured in their ears. Top Saudi clerics criticized the government for giving women the right to drive by saying it would give them easy access to worldly temptation, and “as we know, women are weak and easily tempted.”

However, the Saudi public overwhelmingly supports ending the ban on women drivers. Younger Saudis in particular grasp that they need to become more socially compatible with the rest of the world if they are to compete on the global stage, in an era when oil is no longer the bottomless spring of easy money it once was.

Crucially, there does not seem to be any massive fundamentalist pushback lurking, comparable to how Saudi modernization at the beginning of the oil boom fed the resentments that erupted in 1979. The government is making a serious effort to nourish more moderate interpretations of Islam and improve education.

Granted, some of the social liberalization described by Stancati is incremental, such as upscale Riyadh women getting to decide what color fabric they wish to be wrapped in from head to toe, instead of having to settle for all black. Also, liberalization in the big Saudi cities is much more noticeable than in small towns and distant areas.

Retired Pacific Fleet commander Admiral James Lyons noted in the Washington Times in December that Saudi demographics are now remarkably skewed toward the younger generation, as 70 percent of the population is under 30 years old, and they have little patience for “onerous Islamic restrictions.” He also noted that the post-oil Saudi economy will have to welcome women into the workforce, which necessarily involves lifting restrictions upon them, such as allowing them to drive.

Lyons is willing to cut the crown prince a lot of slack for playing rough as he consolidates power, because it’s necessary to implement rapid reforms against bureaucratic and social inertia in Saudi Arabia. There is also some comfort in knowing that MBS has practical dollars-and-cents reasons to make his reforms stick; if his sense of idealism flags, the sound of a doomsday clock ticking on a trillion-dollar economic collapse should strengthen his resolve.