Saudi Arabia and the United Arab Emirates have attacked their neighbor, Qatar, for supposedly supporting terrorism. They pretend to be firefighters, but spent years as arsonists. Over the years the Saudis, in particular, financed and staffed terrorist groups, including al-Qaeda, which staged the 9/11 attacks. Riyadh’s record has since improved, but only under strong U.S. pressure.

Saudi Crown Prince Mohammed bin Salman has been consolidating power, essentially turning a consensual, familial autocracy into a more traditional personal dictatorship. Most recently he has been detaining and shaking down wealthy family members, an act akin to a criminal gang adjusting members’ shares after a big heist.

Worse, he is thought to have decided on the bloody intervention in Yemen, which has turned a longstanding civil war into a sectarian conflict and killed thousands of civilians. The only positive so far of his de facto reign is his recent decision to liberalize Saudi social life. Women now can breathe and even drive.

However, he has not relaxed political or religious controls. Most important, while limiting the influence of fundamentalist clerics at home, he has not yet dropped the Kingdom of Saudi Arabia’s longstanding support for radical Islamism abroad. Indeed, he might seek to pacify discontented Imams by further channeling their intolerance toward the West.

The KSA spends as much as $4 billion annually promoting its uniquely intolerant brand of Salafist Islamic thought, aimed at the “purification” of the faith known as Wahhabism. By enforcing this rigidly intolerant theology the KSA has acted like a housebroken version of the Islamic State. People have been similarly oppressed and brutalized, but with a veneer of legality. In contrast, ISIS reflects, argued Princeton’s Bernard Haykel, “a kind of untamed Wahhabism.”

Indeed, the two powers used the same school textbooks. Reported the New York Times: “The group circulates images of Wahhabi religious textbooks from Saudi Arabia in the schools it controls. Videos from the group’s territory have shown Wahhabi texts plastered on the sides of an official missionary van.” What has been the impact? Even some Saudi commentators noted that upwards of 4,000 Saudi youth may have joined ISIS in Syria, second only to the number of Tunisians. KSA sent more suicide bombers to Iraq than did any other nation and thousands of other ISIS sympathizers were arrested in Saudi Arabia. Fifteen of the nineteen 9/11 hijackers were Saudis and Osama bin Laden was educated in the KSA. Turkish cleric Mehmet Gormez asked a group of Saudi clerics about 45 Saudis executed for terrorist offenses: “These people studied Islam for 10 or 15 years in your country. Is there a problem with the educational system”?

If MbS, as the crown prince is known, is serious about reform, he and his people should look inward. Of course, the Saudi royals prefer to sell oil to Westerners rather than kill them. But until now sectarian intolerance and religious hatred formed the Kingdom’s foundation. Complained former Sen. Bob Graham, who served on the 9/11 commission: “They have continued, maybe accelerated their support for the most extreme form of Islam.” Which, unfortunately, has created breeding grounds for terrorists.

Wahhabism originated in the 18th century. Muhammad ibn Abd al-Wahhab preached renewal, simplification, and purification of Islam. In the Arabian Peninsula he allied with Muhammad bin Saud, who employed the sword to transform the recalcitrant. Al-Wahhab apparently declared jihad against tribes which resisted his teachings, though it primarily was bin Saud’s son, Abdul-Aziz bin Muhammad, who turned Wahhabism into “an instrument of state terror,” argued Karen Armstrong in the New Statesman.

The political and religious formed a brutal partnership. Reported the International Center for Religion and Diplomacy: “The political vision of Muhammad ibn Saud sought to unite all of the tribes of the Arabian Peninsula under his authority, while the religious vision of Sheikh Muhammad ibn Abdul Wahhab was to purge the land of beliefs and practices that, according to his strict interpretation of theology, contaminated its Islamic identify.” Wahhabism remained the driving theological force of what became the bin Saud dynasty, though the movement’s impact varied over time.

Creation of the Kingdom in 1932 led to a fateful deal: Wahhabists would channel political Islam to buttress rule by the ibn Saud family, who in turn would enforce Wahhabist doctrines. As ICRD put it: “Political obedience, then, was made an Islamic duty, and Salafist obedience was made a royal obligation.” (The later Muslim Brotherhood emphasized piety but not obedience to political authorities.)

The rise of oil prices in the 1970s allowed the royals to live luxuriously while funding Islamic radicalism. In 1979 the Iranian Revolution and attack on Mecca’s Grand Mosque by Islamists calling for the monarchy’s overthrow caused the royals to double down. They imposed greater social restrictions, especially on women, empowered the religious police, and offered increased financial support for Salafists who backed the regime’s legitimacy. In this way the political and religious authorities long reinforced each other’s authority.

In recent years the Saudi royals have spent $3 to $4 billion a year, roughly $100 billion cumulatively, on educational fellowships and scholarships, Islamic clergy and scholars, academics and journalists, construction projects — madrassahs, mosques, universities, and Islamic centers — operating funds, and school materials. Thus, while Wahhabism is a minority view even within Sunni Islam, it accounts for the vast majority of outside funding. Abdurrahman Wahid, a moderate Muslim who once served as Indonesia’s president and headed the Islamic organization Nahdlatal Ulama, said that “Wahhabi/Salafi ideology has made substantial inroads throughout the Muslim world” because of the Saudis’ wealth.

Wahhabism falls within the larger Salafist movement, which extends well beyond the Arabian Peninsula. Scholars disagree over the exact relationship. Some view Wahhabism as a subset of Salafism, while others contend that the two strains of thought essentially have melded into one. In either case, Wahhabism is hostile to America and Americans’ values.

Of particular concern is the Kingdom’s educational efforts, which are directed at radicalizing all who use them. Textbooks and other materials tend to show anyone who does not profess Wahhabist precepts in, shall we say, a bad light. A number of studies have been conducted over the years, sometimes with difficulty, since Riyadh is not always willing to share its publications. Noted the International Center for Religion and Diplomacy, “The consensus findings of these reports demonstrate a consistent pattern of using the educational curriculum to generate a climate of broad-based intolerance for non-Salafist identity groups.”

In its latest report on Saudi Arabia the U.S. Commission on International Religious Freedom demonstrated its continuing concern over the issue. The Commission acknowledged “additional revisions to remove intolerant passages from textbooks and curricula.” However, USCIRF recommended that more be done to “halt the dissemination of intolerant literature and extremist ideology within Saudi Arabia and around the world” and “revise and update textbooks to remove remaining intolerant references that disparage Muslims or non-Muslims or that promote hatred toward other religions or religious groups, a process the Saudi government expected to complete by July 2008.” The Commission worried not only about new textbooks, but the continuing use worldwide of older, more negative books.

For instance, in 2002 the Congressional Research Service reported that the Saudis conceded an internal study had concluded that five percent of the textbook content was “horrible.” A 2003 study by Bader Mousa al-Saif of monotheism texts found degrading attacks on Christians and Jews.

Also in 2003, Eleanor Adbdella Dournato assessed Saudi books. In her judgment, explained ICRD, the texts promoted extremism because of “an aversion to encourage critical thinking and independent reasoning,” leaving students few tools with which to reject charismatic extremist propaganda. The same year a report by Arnon Gross warned that the Saudi materials created an “other” promoted by “a malicious Crusader-Jewish alliance striving to eliminate Islam from all the continents.”

Another 2003 study, by Saudi journalist Ibrahim al-Sakran and former Saudi judge Sheikh Abd al-Aziz al-Qassem, reviewed middle and high school texts. The astonishing conclusion: the program “encourages violence toward others, and misguides the pupils into believing that in order to safeguard their own religion, they must violently repress and even physically eliminate the ‘other.’”

Other studies have consistently criticized Saudi (mis)educational materials. A decade ago Freedom House reported that “The material found in these books reveals that the Saudi government continues to propagate an ideology of hate toward the ‘unbeliever,’ which includes Christians, Jews, Shiites, Sufis, Sunni Muslims who do not follow Wahhabi doctrine, Hindus, atheists and others.”

Author Nina Shea updated the study in 2008 and 2011, and found that extremism and intolerance remained even after Riyadh claimed to have cleansed the texts. In 2011 USCIRF warned about Saudi textbooks reflecting intolerance. Four years ago the State Department spent a half million dollars to study Saudi texts but refused to release the results, which embarrassed the Saudis. The New York Times gained access to the study, conducted by the International Center for Religion and Democracy.

The assessment was not entirely negative, but overall, explained, the ICRD: “The Saudi education system is found to promote intolerance over the course of a student’s career in two primary ways: it creates a climate of general prejudice against non-Salafist and non-Muslim groups, and it contains direct discriminatory calls to action — both violence and non-violent. This intolerance is supported through a web of misrepresentation, complicated and contrived identity associations, and the misapplication of selective interpretations of scripture. Such prejudice is not conducive to stability, cooperation and prosperity in a society that includes a large number of foreign residents and workers.” The group listed specific passages to back its judgment.

Noted ICRD: “All the while students are inculcated with fear and hostility toward what conservative Salafist clerics deem to be threats to Islam. Discriminatory and occasionally violent calls to action are scattered throughout the curriculum, and are supported by a litany of charges against the targets. Everything from avoidance to hatred and murder is advocated.”

Earlier this year David Andrew Weinberg of the Foundation for Defense of Democracies assessed Saudi textbooks for the 2016-17 school year. He found that they were more likely to recommend execution for lifestyle choices than the actual practice of the Saudi state. Noted Weinberg: “The language in 2016-2017 Saudi textbooks that calls for killing people who engage in adultery, anal sex, apostasy, or certain supposed acts of sorcery are not the only passages that encourage violence against those who act in a manner inconsistent with the state’s vision of Islam.”

Unsurprisingly, Saudi materials are used around the world in madrassas/schools operated by Riyadh. The textbooks also end up in facilities run by others. Particularly striking is the fact, noted earlier, that the Islamic State used Saudi textbooks. In July Weinberg testified before Congress: “Much like those books recommended, the Islamic State executed numerous individuals on suspicion of homosexuality, insulting Allah or the Prophet Muhammad, adultery, or purported sorcery.” Even many mosques in the U.S. use Saudi materials.

Saudi authorities respond to Western criticism contending that they have cleaned up the textbooks. There have been changes, but with only limited substantive effect. Weinberg reported that “as the author of the most recent published study on incitement remaining in Saudi textbooks today, I can vouch that over a decade later Riyadh still has not persuasively shown that this problem has been resolved.” As the Washington Institute summarized the issue: “Saudi high school-level textbooks continue to feature much inciteful language, promote intolerance, vilify non-Sunni Muslims (including forbidding friendship with ‘infidels’), and spout vile anti-Semitism.”

Riyadh’s lavish support for the otherwise marginal Islamic thought has radicalized Muslims globally. Argued Thomas Hegghammer, a Norwegian terrorism specialist, the Saudis have hindered the sort of moderating evolution seen in Christianity, most notably the Reformation and Second Vatican Council: “If there ever was going to be an Islamic reformation in the 20th Century, the Saudis probably prevented it by pumping out literalism.”

Max Singer of the Hudson Institute argued that Riyadh “drastically increased the size of the radical Muslim population.” Farah Pandith, who visited 80 nations while serving as the State Department’s special representative to Muslims, said, “In each place I visited, the Wahhabi influence was an insidious presence.” The impact varies by country and region. Scott Shane of the New York Times reported that the KSA’s influence was most harmful “in divided countries like Pakistan and Nigeria,” where “the flood of Saudi money, and the ideology it promotes, have exacerbated divisions over religion that regularly prove lethal.”

Admittedly, Wahhabism’s relationship with terrorism remains indirect. It essentially is a theology of hate and intolerance, or what the group Freedom House called an “ideology of religious hatred.” Unfortunately, if you don’t believe other people should be treated with dignity and respect, you are more likely to eventually view them as deserving death.

The American Enterprise Institute’s Katherine Zimmerman classified Wahhabi-Salafist toward the violent jihadist end of the Sunni Islamic spectrum. She explained:

The Salafi-jihadi movement — not simply distinct groups or individuals — threatens the United States, the West, and Muslim communities. The movement draws strength from its ideology, which helps to unify and band together a network of individuals, groups, and organizations seeking a shared global outcome: destruction of current Muslim societies through the use of force and creation of what they regard as a true Islamic society. This network is the Salafi-jihadi base and constitutes the primary source of strength for al Qaeda and ISIS. New groups would form from the movement if the existing ones are ever destroyed.

The consequences have been grave. The ICRD warned: “A number of violent extremists around the world have reported that their radicalization first began when they were exposed to Salafist literature or websites.” Manas Sen Gupta of the website TopYaps contended that “al Nusra, Boko Haram and nearly every single barbaric Islamic terrorist group” adhere to Wahhabism.

Unfortunately, many Wahhabist extremists feel impelled to act. Saudi-born Madawi al-Rashid, then a visiting professor at the London School of Economics, noted that Wahhabism “can be a revolutionary language that would inspire someone to commit atrocities in the name of Islam.” Complained Sen Gupta: “The Wahhabi doctrine will keep on creating terrorists who will keep on killing innocents. It is that doctrine which the fundamentalists use to kill Shias, Christians, Hindus” and others.

More than individuals are at risk. The Islamic Supreme Council of America pointed to the rise of Wahhabism in Central Asia: “Should this radicalized understanding of Islam continue to spread unchecked, radical interpretations could threaten social stability at the local, national, and regional levels and create serious geopolitical dangers to which neighboring powers, as well as the U.S. and Europe, would have to react.” The same applies elsewhere in the world.

Washington long pressed the KSA to cut its support for radical Islamism, but the royals have rarely yielded to Washington on matters involving religion. President Trump claims to be tougher than his predecessors. If so, he should challenge Riyadh’s backing for Wahhabism, which threatens his administration’s agenda. Warned the ICRD: “A failure by Saudi Arabia to thoroughly reform its educational system will directly undermine U.S. foreign policy goals of encouraging moderation and democratic progress within the Islamic world.”

Weinberg makes a similar argument: “addressing incitement in Saudi Arabia, including in textbooks, is a serious national security issue. Saudi society has been a top source of foreign terrorist fighters — and at times, terrorist leaders.” As long as the KSA creates fertile ground for Islamic extremism, America is likely to find terrorists being created faster than they are being killed.

Other nations also have promoted Islamist fundamentalism and intolerance, but Riyadh’s role stands out. Of course, there are other sources of intolerance, which does not inexorably lead to murder or terrorism. Nevertheless, the flood of KSA money promoting Wahhabism has acted as an accelerant, encouraging new violent outbursts and spreading old conflicts around the globe.

Indeed, Riyadh’s malign campaign may help explain why the more effort the U.S. puts into fighting extremist forces abroad, the more violent radicals Washington appears to face. It is essential that America make fewer enemies abroad. Part of that is convincing Washington’s supposed allies to stop spreading hate around the globe. A good place to start would be to insist that the KSA keep its Wahhabist evangelists at home.