In recent days, the dark ideology of Islamic terrorism has been implemented, among other places, by massacres in a kosher deli in Paris, in Belgium towns, outside a synagogue in Copenhagen, and in Libya where dozens of Christian Copts have been murdered. It must be countered.

Destiny makes Saudi Arabia crucial in the war against terrorism. Despite the fact that is responsible for funding and supporting the development of jihad and Islamist terrorism, it must now change its strategy and transform itself into the key leader in the war against what has become the Islamist menace to all civilization, including its own.

Saudi Arabia is a Janus-head personified, politically and religiously, by an agreement made in 1744 when the leader of the Saud family made a pact with the founder of Wahhabism, the extreme form of Sunni Islam. In exchange for their support of the Saud family, that family would protect followers of Wahhabism and adhere to its doctrine. The country still rests on that pact, an alliance between the royal family and the ulema, the religious elite of scholars. The wheels of change grind slowly in Saudi Arabia, a country led by a ruling family, the aging sons of the King Abdulaziz, the founder of the regime in 1932.

Power is divided between the two sets of authority: the ulema control mosques, culture, and education; the monarchy controls foreign and military policy. But the religious authorities have considerable influence over government decisions, in the judicial and educational systems, and in religious and social behavior. The Council of Senior Ulama, advises the king on religious matters. The religious police force, Committee for the Promotion of Virtue and the Prevention of Vice, enforces dress codes and other personal behavior.

The House of Saud is an autocratic and virtually absolute monarchy, now headed by King Salman aged 79, who had been governor of Riyadh for 48 years. The country developed its economy and lives on its oil wealth, possessing the largest oil reserves and being the biggest oil exporter in the world.

The sins of Saudi Arabia are familiar. Everyone is aware of the lack of freedom in the kingdom, and especially its inequity regarding women who are treated as the property of male relatives. A number of reforms, introduced by the late King Abdullah, allow women to play a more visible role in public life. However, women are still restricted in many ways. They are still controlled by male guardians who must give them permission to travel, work, or get medical treatment. They are not legally permitted to drive a car.

At the core of this disregard for human rights is the religious influence. The problem for Saudi Arabia is the reliance of the royal family on the extremist Wahhabi version of Islam. Article 1 of the 1992 Saudi Basic Law of Governance states, “The Kingdom of Saudi Arabia is a sovereign Arab Islamic State… Its constitution is the Holy Koran, and the Sunni Traditions of the Prophet.” Illustrating the connection, King Fahd in 1986 changed his title from “His Majesty” to “Custodian of the Two Holy Mosques,” Mecca and Medina. Sharia law is the basis of the legal system.

Wahhabism sustains the country. It declares that it perpetuates the religious purity of the Prophet Muhammad, and commands obedience to the state. It propagates an ideology of hatred of Shias, as well as Christians and Jews. It believes in strict punishment for offenders. Little dissent is allowed, journalists are arrested and flogged, and criticism of its doctrine is severely punished. Human rights are violated by arbitrary arrest and secret trials. Estimates suggest that more than 5,000 people are political prisoners. Paradoxically, in spite of its lack of human rights Saudi Arabia was elected a member of the UN Human Rights Council for 2014-2016.

Because of its alliance with Wahhabism, Saudi Arabia has been the world’s largest funder and promoter of jihadism. It has contributed to the explosion of Islamist terrorism around the world. More than $100 billion has been spent on exporting the Wahhabi jihadist interpretation of Islam. Saudi Arabia has funded more than 1500 mosques and madrassas (Islamic schools), has provided training for countless fundamentalist imans, financed media and publishing companies to issue textbooks advocating jihad, created fellowship programs to promote an extremist point of view in academic programs and cultural centers. Wahhabism is the ideological basis of al-Qaeda, the Taliban, the Islamic State in Iraq and Syria, and terrorist groups throughout the world.

If Saudi Arabia is going to find solutions to the complex, interrelated problems with which it is confronted, it has to loosen its ties to and its reliance on Wahhabism. There are four basic problems. One problem is its decisions on the production and price of oil, and the impact of those decisions on the economies of outside countries: the U.S. shale industry, Russia, and especially on Iran. Another is the concern about President Barack Obama’s actions regarding a nuclear agreement with Iran. A third is the challenge to the Saudis and the ambition of Iran to become the dominant power in the Middle East. But the fourth underlies the first three: it is the dominant threat to Saudi Arabia itself as well as the rest of the world of the continuing and expanding Islamist terrorism.

There are signs that the Saudis have begun to understand the Islamist threat they have done so much to unleash. They have gone so far as to censure President Obama for his weak, inadequate response to Islamic terrorism. In 2011, Saudi Arabia criticized the Obama administration for its withdrawal of support for Egyptian President Mubarak, and for giving some approval to the Muslim Brotherhood in Egypt. In contrast to the U.S., Saudi Arabia supported and assisted the military coup that overthrew Egyptian President Morsi and the Muslim Brotherhood-led government in Egypt. Above all the Saudis criticized Obama for his unseemly haste to court and negotiate with Iranian President Hasan Rouhani on nuclear issues.

In a political surprise, Saudi Arabia, after being elected to a non-permanent rotating seat on the UN Security Council on October 17, 2013, turned it down, accusing the body of “double standards” that prevent it from carrying out its duties and responsibilities in keeping world peace and security. In effect it was a reprimand of U.S. policy. The Saudis had given advance approval to the anticipated U.S. strike on Syria after President Assad had used chemical weapons to kill his own people. But Obama did not launch a punitive strike against Syria which had crossed the “red line,” he had drawn as an ultimatum, and the international community also failed to act.

The Saudis fear that Obama will make a deal with Iran that will not effectively reduce its nuclear capacity. They are attempting, among other things, to check Iranian influence by providing funding for the Lebanese military, engaged in the struggle against Hizb’allah.

These actions suggest that the Saudis are now conscious both of the havoc in the world resulting from jihadism and the danger of a powerful Iran. Saudi Arabia must go further and play a major role in extinguishing the flame of the dark Islamist ideology. Its royal family must limit the influence of Wahhabism in the country and the spread of its ideas abroad. By ending all funding of groups relating to terrorist activities, controlling the use of mosques and madrassas used for terrorist purposes, limiting the training of fundamentalist imams, and declaring that jihadism is not warranted by true Muslims, it can accomplish from within what the democratic West, so far, has been unable to do from without.

First published in the American Thinker.