In the wake of the horrific gun rampage in Orlando, Florida, U.S. President Barack Obama declared that Omar Mateen, who killed 49 people in the Pulse nightclub, was radicalized online, saying he had been “inspired by various extremist information that was disseminated over the internet.”

While that may be partly true, the Orlando shooter’s jihadi indoctrination can actually be traced to his father, Seddique Mateen, a local guerrilla commander in the U.S.-backed jihad against Soviet forces in Afghanistan in the 1980s.

The elder Mateen, an asset to the CIA, was rewarded with permanent residency in the United States, where his son was born. With the father presenting himself as an Afghan emigre leader and building close ties with some U.S. government officials and lawmakers, the FBI failed to stop Omar from carrying out the shootings despite interviewing him three times in recent years on suspicion of terrorist links.

The U.S. debate on the Orlando massacre has focused on the killer’s troubled life and sexual orientation, but is missing the bigger picture. The real issue centers on the spreading jihadism that is inspiring a spate of terrorist attacks around the world, from Boston and Paris to Brussels and San Bernardino, California.

The only way to defeat an enemy driven by such pernicious ideology is to emasculate the ideology. The West won the Cold War not so much by military means as by spreading the ideas of political freedom and market capitalism that helped suck the lifeblood out of communism’s international appeal, making it incapable of meeting the widespread yearning for a better, more open life.

Today, stemming the spread of the Islamist ideology that has fostered “jihad factories” holds the key to containing terrorism.

This demands two things. The first is finding ways to stop the Saudi, Qatari and other Wahhabi religious-industrial complexes from exporting Wahhabism, a messianic, jihad-extolling form of Sunni fundamentalism that promotes, among other things, the subjugation of women and the death of “infidels.” The cloistered Arab royals continue to fund Muslim extremist groups and “madrassas” (Muslim schools) in other countries.

Their export of Wahhabism has not only snuffed out more liberal Islamic traditions in many countries but also created the wellspring that feeds extremism and terrorism. Wahhabi fanaticism, in fact, is the ideological mother of modern terrorism. A spreading jihadi threat has emerged as a major security concern from Asia and Africa to Europe and North America.

The other imperative is for the United States to learn lessons from its role — indirect and direct — in fomenting jihadism over the years in pursuit of narrow geostrategic objectives in some regions.

America’s troubling ties with Islamist rulers and groups were cemented in the 1980s, when President Ronald Reagan used Islam as an ideological tool to spur jihad against the Soviet invasion of Afghanistan. Through a covert program of unparalleled size, CIA trained and armed thousands of guerrillas with Arab petrodollars and the help of Pakistan’s rogue, military-run Inter-Services Intelligence (ISI) agency.

Some U.S. allies, including al-Qaida leader Osama bin Laden and Taliban chief Mullah Mohammed Omar, later became America’s nemesis. Indeed, it is America’s allies of convenience — both state and non-state — that have come to haunt the security of Western and non-Western democracies alike.

In the second half of the Cold War, for example, the U.S. tacitly encouraged Saudi Arabia to export Wahhabism as an antidote to communism and the 1979 anti-American Shiite revolution in Iran. Developments since the end of the Cold War show that Wahhabi fanaticism is the root from which the world’s leading Islamist terrorist groups — such as the Islamic State, al-Qaida, the Taliban, Laskar-e-Taiba, Boko Haram and al-Shabaab — draw their ideological sustenance.

Although the U.S.-Saudi alliance has come under strain of late, America has still to release a long-classified section of a 2002 congressional report that discusses a possible Saudi government role in the Sept. 11, 2001, terrorist attacks, in which 15 of the 19 passenger jet hijackers were Saudi citizens. Before the approaching 15th anniversary of 9/11, the U.S. would do well to lift the secrecy of the so-called 28 pages. There is no reason why the truth should still be suppressed.

More broadly, the spread of jihadism underscores the imperative for major powers to focus on long-term goals rather than short-term objectives. The need for caution in training Islamic insurgents and funneling lethal arms to them to help overthrow a regime is highlighted by the current chaos in and refugee exodus from Syria and Libya, which now rival Pakistan and Afghanistan as international jihadi citadels.

In fact, the recent terror strikes in the West suggest they are blowback from the interventionist policies of some powers that have helped unravel fragile states like Libya, Syria, Iraq, Yemen and Afghanistan. Reprisal for Western meddling in the Islamic world is usually the reason the attackers have claimed for striking. No Western actions, however, can provide jihadis a scintilla of justification for killing innocent people.

Yet one cannot ignore the fact that misguided policies have aided jihadism. For example, U.S. policy in the 1980s gave the CIA-trained insurgents battling Soviet forces in Afghanistan a veneer of religious respectability by calling them “mujahedeen” (or Islamic holy warriors), a label still in use in Western literature. Today, Islamist terrorism is a reminder that jihad cannot be geographically confined to a targeted nation, however distant, as the examples of Afghanistan, Syria and Libya indicate.

Containing the spread of the jihad virus is a difficult challenge. The Orlando shooting shows how the offspring of former “holy warriors” who emigrated to the U.S. can imbibe violent jihadism.

Take the 2013 Boston Marathon attack case: Anzor Tsarnaev, the Chechen father of the two terrorists involved in the bombings, Tamerlan and Dzhokhar Tsarnaev, moved to America with his family with the help of his U.S.-based brother, who had married the daughter of a former high-ranking CIA officer, Graham Fuller. An ex-CIA station chief in Kabul, Fuller was an architect of the Reagan-era “mujahedeen” war against Soviet forces, waged through a transnational jihad network whose leading lights included bin Laden.

Tamerlan and Dzhokhar Tsarnaev were radicalized in the U.S. Similarly, the Paris and Brussels attackers — mainly European nationals of Middle Eastern or North African descent — developed their violent jihadi leanings in France or Belgium.

The fact that what goes around comes around is apparent also from the domestic jihadi threat now faced by jihad-exporting Saudi Arabia, which has bankrolled Islamist terrorism ever since the oil-price boom of the 1970s boosted the country’s wealth dramatically. Likewise, for another leading state sponsor of terrorism, Pakistan, the chickens are coming home to roost with a vengeance.

As U.S. secretary of state, Hillary Clinton publicly warned Pakistan that keeping “snakes in your backyard” was dangerous as “those snakes are going to turn on” it. This warning, however, was equally applicable to the U.S., Britain and France. The three Western powers, instrumental in turning Libya into a battle-worn wasteland through a botched regime change, continue to speciously distinguish between “moderate” and “radical” jihadis in Syria so as to aid the former, although those waging jihad by the gun can never be moderate.

The global war on terror, now almost a generation old, will never be won with treacherous allies, such as jihadi rebels and Wahhabism-exporting sheikhdoms. Such alliances, as recent terror attacks indicate, strengthen jihadism and endanger Western security. It is time for Western powers to reconsider their regional strategies and focus attention on attacking the ideology driving terror.

Brahma Chellaney, a geostrategist and author of nine books, is a longtime contributor to The Japan Times.

In a time of both misinformation and too much information, quality journalism is more crucial than ever.
By subscribing, you can help us get the story right.