Vice President Dick Cheney walks with newly crowned King Abdullah, former President George H.W. Bush, and former Secretary of State Colin Powell during a retreat at King Abdullah's Farm in Riyadh, Saudi Arabia August 5, 2005, following the death of Abdullah's half-brother King Fahd August 1, 2005. White House photo by David Bohrer

Chatting with Australian Prime Minister Malcolm Turnbull at the Asia-Pacific Economic Cooperation summit in November 2016, Barack Obama mentioned Indonesia, where he spent part of his childhood back in the 1960s. The country, he noted, was a changed place. Where Muslims once adopted elements of Hinduism, Buddhism, and animism, a more austere version of Islam had taken hold once Saudi Arabia began pouring money into Wahhabist madrassas in the 1990s. Where women had formerly gone about with their heads uncovered, the hijab began to spread.

But why, Turnbull wanted to know, was this happening? “Aren’t the Saudis your friends?” To which Obama replied, “It’s complicated.”

That c-word covers a lot of territory, not only with regard to Wahhabism, the ultra-fundamentalist Saudi ideology whose impact is now felt across the globe, but also with regard to the United States, the Saudis’ chief patron, protector—and enabler—since World War II. Like any imperialist power, the United States can be a bit unscrupulous in the partners it chooses. So one might expect it to look the other way when its Saudi friends spread their militant doctrines into Indonesia, the Philippines, the Indian subcontinent, Syria, and numerous points beyond.

But Washington did more than just look away. It actively encouraged such activities by partnering with the Wahhabists in any number of hotspots. They include Afghanistan, where American- and Saudi-armed jihadis drove out the Soviets in the 1980s. They also include Bosnia, where the two countries reportedly teamed up in the mid-1990s to smuggle hundreds of millions of dollars worth of arms into Alija Izetbegović’s Islamic republic, today a stronghold of Wahhabist Salafism. Other notable examples: Kosovo, where the United States joined forces with “Afghan Arabs” and other Saudi-backed jihadis in support of the secessionist movement of Hashim Thaçi; Chechnya, where leading neocons such as Richard Perle, Elliott Abrams, Kenneth Adelman, Midge Decter, Frank Gaffney, Michael Ledeen, and R. James Woolsey championed Saudi-backed Islamist rebels; Libya, where Hillary Clinton personally recruited Qatar to join the effort against Muammar Qaddafi and then said nothing as the Wahhabist kingdom funneled some $400 million to rebel groups, many of them Islamists who proceeded to turn the country upside down; and of course Syria, where Sunni head-choppers backed by the Saudis and other oil monarchies have turned the country into a charnel house.

The United States pronounces itself shocked—shocked!—at the results, while pocketing the winnings. This is evident from a famous 1998 interview with Zbigniew Brzezinski, who, as Jimmy Carter’s national security adviser, did as much as anyone to invent the modern phenomenon of jihad. Asked if he had any regrets, Brzezinski was unabashed:

Regret what? That secret operation was an excellent idea. It had the effect of drawing the Russians into the Afghan trap, and you want me to regret it? The day that the Soviets officially crossed the border, I wrote to President Carter: We now have the opportunity of giving to the USSR its Vietnam war….What is most important to the history of the world? The Taliban or the collapse of the Soviet empire? Some stirred-up Muslims or the liberation of Central Europe and the end of the Cold War?

Or, as Graham Fuller, former deputy director of the CIA’s National Council on Intelligence and later a RAND Corporation analyst, put it a year later:

The policy of guiding the evolution of Islam and of helping them against our adversaries worked marvelously well in Afghanistan against the Red Army. The same doctrines can still be used to destabilize what remains of Russian power and especially to counter the Chinese influence in Central Asia.

What could possibly go wrong? Less a specifically Saudi phenomenon, the great Wahhabist offensive of the last 30 or 40 years is best understood as a joint venture between oil imperialism and neo-medieval Islamic revivalism. On its own, such an austere doctrine would never have made it out of the badlands of central Arabia. Only in conjunction with outside powers, first Britain and then the United States, did it turn into a world-altering force.

Still, a bit of pre-history might be helpful. In order to know how Wahhabism arose, it’s necessary to know where it arose. This is Nejd, a vast plateau in central Arabia that is nearly the size of France. Ringed on three sides by desert and on the fourth by the somewhat more fertile Red Sea province of the Hejaz, it was one of the most isolated and barren spots on earth until oil was discovered in the 1930s. Less isolated now, it remains extremely barren. The English explorer Lady Anne Blunt described it in 1881 as consisting of “vast uplands of gravel, as nearly destitute of vegetation as any in the world,” dotted with occasional settlements that were nearly as cut off from one another as they were from the outside world. It was one of the few third-world countries still uncolonized by the 19th century, not because it was unusually strong or well organized but because it was too poor, wild, and inaccessible to be worth the effort.

It was a land that no one else wanted. It also was home to an ideology that no one else wanted. This was Hanbalism, the most severe and unforgiving of the four major schools of Islamic jurisprudence. It arose in Baghdad in the 9th century and within a few decades was wreaking havoc as adherents plundered homes to confiscate liquor, musical instruments, and other forbidden items; raided shops; and challenged men and women walking together in the street. Expelled from the metropolis, Hanbalis found themselves relegated to the most primitive and distant outposts, Nejd most notably. But then, in the mid-18th century, they found themselves under attack by a wandering preacher named Muhammad ibn Abd al-Wahhab, for whom Hanbalism was not severe enough.

Moving from village to village, “the Luther of Mahometanism,” as Lady Blunt described him, denounced such folk practices as worshiping at saints’ graves and praying at sacred trees. Theologically, Wahhab’s great contribution was to take the concept of shirk, or association, which traditionally referred to the worship of any deity in conjunction with Allah, and expand it to include anything that distracted from the single-minded focus on the one true god. Seeking the intervention of a saint, wearing a good-luck charm, even adorning the interior of a mosque—all were shirk. The goal was a religion as bare as the landscape, one that allowed nothing to come between man and God.

Presumably, Wahhab was not the first mullah to inveigh against superstition. But what distinguished him was his energy, his fanaticism—he made a name for himself by ordering the stoning of an accused adulteress—and an alliance he made in 1744 with a tribal leader named Muhammad bin Saud. In exchange for military backing, al-Wahhab provided bin Saud with the legal writ to rob, kill, or enslave anyone who refused to bow down to the new doctrine. Backed by fanatical Bedouins known as the Ikhwan, or Brotherhood, Saud and his sons set about conquering the desert interior.

A new dynasty was born. The Saudi-Wahhabi alliance amounted to a “constitution” of sorts in that it laid down basic rules that the new kingdom would have to follow. The al-Saud gained untrammeled economic and political authority. But the clan also acquired the religious obligation to support and defend the Wahhabiyya and struggle against practices that they regarded as un-Islamic. The moment it faltered, its legitimacy would vanish.

This explains both the strength and weakness of the Saudi state. At first glance, Wahhabism would seem to be the most untamable of ideologies since the only submission it recognizes is to God. But after being briefly toppled by the Ottomans in 1818, the al-Saud could only claw their way back by garnering outside support. The regime’s survival therefore hinged on balancing a fierce religious establishment against international forces that, as the dynasty knew too well, were infinitely more powerful than any horde of desert horsemen.

The tidal wave of oil money that washed over the kingdom in the 1970s compounded the problem. Not only did the al-Saud dynasty have to balance off the Wahhabiyya against the United States, but it also had to balance religious austerity off against modern consumerism. In the 1920s, mullahs had raged against foreign travel and telephones. A member of the Ikhwan once even struck a royal servant of the king for riding a bicycle, which the Wahhabists denounced as “Satan’s carriages.” But now the mullahs had to contend with Rolls Royces, Land Rovers, shopping malls, cinemas, female newscasters, and, of course, the growing ubiquity of sex.

What was to be done? The answer became clear in 1979, when three epochal events occurred. In January, the shah of Iran fled by plane to Egypt, paving the way for Ayatollah Khomeini’s triumphant return to Tehran two weeks later. In July, Jimmy Carter authorized the CIA to begin arming the Afghan mujahideen, prompting the Soviet Union to intervene several months later in support of the embattled left-wing government in Kabul. And in November, Wahhabist militants seized control of the Grand Mosque in Mecca, holding it for two weeks before being dislodged by French commandos.

The last was particularly shocking because it was quickly apparent that the militants enjoyed widespread clerical support. Juhayman al-Otaybi, leader of the assault, was a member of a prominent Ikhwan family and had studied under the grand mufti, Abd al-Aziz ibn Baz. While the Wahhabists condemned the takeover, their language, according to the journalist Robert Lacey, “was curiously restrained.” Support for the royal family was beginning to waver.

Plainly, the Saudi royal family needed to mend relations with the Wahhabiyya while burnishing its Islamic credentials in order to fend off criticism at home and abroad. It had to reinvent itself as an Islamic state no less militant than the Persian one across the Persian Gulf. But the burgeoning conflict in Afghanistan suggested a way out. While the United States could funnel aid to anti-Soviet forces, it obviously could not organize a proper jihad on its own. For that, it needed the help of the Saudis, which the kingdom now hastened to provide.

Out went the multiplexes and female news presenters, and in came the religious police and 75 percent discounts on Saudi Arabian Airlines for holy warriors traveling to Afghanistan by way of Peshawar, Pakistan. Thousands of bored and restless young men who might have caused trouble for the kingdom were shipped off to a distant land to make trouble for someone else. Saudi princes could still party as if there were no tomorrow, but now they had to do so abroad or behind closed doors at home. The homeland would otherwise have to remain pure and unsullied.

It was a neat solution, but it still left a few strings untied. One was the problem of blowback in the form of hardened jihadis returning from Afghanistan more determined than ever to battle corruption at home. “I have more than 40,000 mujahideen in the land of the two holy mosques alone,” Osama bin Laden reportedly told a colleague. It was a claim that could not be entirely laughed off once al Qaeda bombs starting going off in the kingdom beginning in 1995. Another problem concerned whom the militants targeted abroad, a problem that initially didn’t loom very large but would eventually prove highly significant.

Still, the new partnership worked brilliantly for a time. It helped the al-Saud regime mollify the ulema, as the mullahs are collectively known, which had come to see the umma, or community of the faithful, as besieged on multiple fronts. As Muhammad Ali Harakan, secretary-general of the Saudi-sponsored Muslim World League, put it as early as 1980:

Jihad is the key to Muslims’ success and felicity, especially when their sacred shrines are under Zionist occupation in Palestine, when millions of Muslims are suffering suppression, oppression, injustices, torture, and even facing death and extermination campaigns in Burma, Philippines, Patani [a predominantly Muslim region of Thailand], USSR, Cambodia, Vietnam, Cyprus, Afghanistan, etc. This responsibility becomes even more binding and pressing when we consider the malicious campaigns being waged against Islam and Muslims by Zionism, Communism, Free Masonry, Qadianism [i.e. Ahmadi Islam], Bahaism, and Christian Missionaries.

The Wahhabiyya would overlook the princes’ many sins if they used their newfound wealth to defend the faith.

The arrangement also worked for the United States, which acquired a useful diplomatic partner and an auxiliary military force that was cheap, effective, and deniable. It worked for gung-ho journalists traipsing through the wilds of Afghanistan, who assured the folks back home that the “muj” were nothing more than “ornery mountain folk who have not cottoned to a foreign power that has seized their land, killed their people, and attacked their faith,” to quote William McGurn, who went on to prominence as a speechwriter for George W. Bush.

It worked for nearly everyone until 19 hijackers, 15 of them Saudis, flew a pair of fuel-laden jetliners into the World Trade Center and a third into the Pentagon, killing nearly 3,000 people in all. The 9/11 attacks should have been a wake-up call that something had gone seriously amiss. But instead of pressing the pause button, the United States opted to double down on the same old strategy. From its perspective, it had little choice. It needed Saudi oil; it needed security in the Persian Gulf, global commerce’s most important chokepoint; and it needed a reliable ally in the Muslim world in general. Moreover, the Saudi royal family was clearly in trouble. Al Qaeda enjoyed wide public support. Indeed a Saudi intelligence survey reportedly found that 95 percent of educated Saudis between the ages of 25 and 41 had “sympathies” for bin Laden’s cause. If the Bush administration had walked off in a huff, the House of Saud would have become more vulnerable to al Qaeda rather than less.

Consequently, Washington opted to work on the marriage rather than splitting up. This entailed three things. First, there was a need to cover up Riyadh’s considerable role in the destruction of the Twin Towers by, among other things, suppressing a crucial 29-page chapter in a joint congressional report dealing with Saudi links to the hijackers. Second, the Bush administration redoubled efforts to pin the blame on Saddam Hussein, Washington’s latest villain du jour. Need “best info fast,” Secretary of Defense Donald Rumsfeld ordered while the towers were still burning, according to notes taken by his aide Stephen Cambone. “…Judge whether good enough [to] hit S.H. at same time—not only UBL [i.e. Usama bin Laden]. Hard to get a good case. Need to move swiftly—Near term target needs—Go massive—sweep it all up, need to do so to get anything useful. Things related or not.” Washington needed a fall guy to get the Saudis off the hook.

Third was the need to prosecute the so-called “War on Terror,” which was never about terrorism per se but about terrorism unsanctioned by the United States. The goal was to arrange for jihadis only to strike at targets jointly approved by Washington and Riyadh. This meant, first and foremost, Iran, the Saudis’ bête noire, whose power, ironically, had grown after the U.S. invasion of Iraq had tipped the formerly Sunni-controlled country into the pro-Shi‘ite column. But it also meant Syria, whose president, Bashar al-Assad, is an Alawite, a form of Shi‘ism, and Russia, whose friendliness to both countries left it doubly marked in U.S. and Saudi eyes. Ideologically, it meant taking Wahhabist anger at Western powers such as America, Britain, and France and directing it at Shi‘ism instead. The doors to sectarianism were thus opened.

The “redirection,” as investigative reporter Seymour Hersh termed it in 2007, also worked brilliantly for a time. Hersh described it as the product of four men: Vice President Dick Cheney; neocon Elliott Abrams, at the time deputy national security adviser for “global democracy strategy”; U.S. Ambassador to Iraq Zalmay Khalilzad; and Prince Bandar bin Sultan, for 22 years the Saudi ambassador to the United States and now the kingdom’s chief of national security. In Lebanon the goal was to work closely with the Saudi-backed government of Prime Minister Fouad Siniora to limit the influence of the pro-Iranian Shi‘ite militia Hezbollah, while in Iraq it entailed working more closely with Sunni and Kurdish forces to rein in Shi‘ite influence. In Syria, it meant working with the Saudis to strengthen the Muslim Brotherhood, a Sunni group locked in a ferocious struggle with the Baathist government in Damascus since the 1960s. Indeed a secret 2006 State Department memo made public by Wikileaks discussed plans to encourage Sunni fears of growing Shi‘ite influence even though it conceded that such concerns were “often exaggerated.”

The “redirection” program soon imploded. The problem began in Libya, where Hillary Clinton spent much of March 2011 persuading Qatar to join the effort against strongman Muammar Qaddafi. Emir Tamim bin Hamad al-Thani eventually agreed and took the opportunity to funnel some $400 million to rebel groups, many of them Sunni Salafists who proceeded to turn the country upside down. The result was anarchy, yet the Obama administration stayed mum for years after. In Syria, the Defense Intelligence Agency determined in August 2012 that “events are taking a clear sectarian direction”; that Salafists, the Muslim Brotherhood, and al Qaeda “are the major forces driving the insurgency”; and that, despite this fundamentalist surge, the West, Turkey, and the Gulf states still backed the anti-Assad uprising. “If the situation unravels,” the report went on, “there is the possibility of establishing a declared or undeclared Salafist principality in eastern Syria … and this is exactly what the supporting powers to the opposition want, in order to isolate the Syrian regime, which is considered the strategic depth of the Shia expansion….” Eastern Syria, of course, became part of the Caliphate declared by ISIS—the recipient of “clandestine financial and logistic support” from both Saudi Arabia and Qatar, according to no less an authority than Hillary Clinton—in June 2014.

The war on terror turned out to be the longest route possible between Sunni terrorism and Sunni terrorism. Once again, the United States had tried to use Wahhabism to its own advantage, but with consequences that proved nothing less than disastrous.

What went wrong? The problem is two-fold. Wahhabism is an ideology of Bedouin zealots who may be adept at conquering their fellow tribesmen but who are incapable of governing a modern state. This is nothing new. It’s a problem discussed by Ibn Khaldun, the famous North African polymath, in the 14th century and by Friedrich Engels, Marx’s collaborator, in the late 19th, but the bottom line is an endlessly repetitive cycle in which nomadic fanatics rise up, overthrow a regime that has grown soft and corrupt, only to grow soft and corrupt themselves before succumbing to yet another wave of desert warriors. The result is anarchy piled on top of anarchy.

The other problem involves U.S. imperialism, which, in contrast to the French and British varieties, eschews the direct administration of colonial possessions for the most part and instead seeks to leverage U.S. power via innumerable alliances with local forces. Unfortunately, leverage works the same way in diplomacy as in finance—i.e., as a multiplier of both gains and losses. As part of its alliance with the Saudis, the United States encouraged the growth not only of jihad but of Wahhabism in general. It seemed like a good idea when the Saudis established the Muslim World League in Mecca in 1962 as a counter to Egypt’s Gamal Abdel Nasser. So how could Washington object when the kingdom vastly expanded its missionary effort in 1979, spending anywhere from $75 billion to $100 billion to spread the word? King Fahd, who ruled from 1982 to 2005, bragged about all the religious and educational facilities he built in non-Muslim lands—200 Islamic colleges, 210 Islamic centers, 1,500 mosques, 2,000 schools for Muslim children, etc. Since the aim was to combat Soviet influence and promote a conservative view of Islam, U.S. fortunes received an immense boost.

It seemed like a good idea for some 15 to 20 years. Then bombs started going off, the 9/11 attacks rocked America, the United States rushed into the restless Middle East, and radical Saudi Wahhabism metastasized beyond its spawning ground. U.S. fortunes haven’t been the same since.

Daniel Lazare is the author of The Frozen Republic: How the Constitution Is Paralyzing Democracy (Harcourt Brace, 1996) and other books about American politics. He has written for a wide variety of publications from The Nation to Le Monde Diplomatique, and his articles about the Middle East, terrorism, Eastern Europe, and other topics appear regularly on such websites as Jacobin and Consortium News.