ORAN, Algeria — Some time ago, an Algerian cartoonist known as le Hic summarized the situation in Saudi Arabia with a few harsh strokes of his pen: In a drawing, the Saudi king announces his resolve to combat terrorism while pointing a gun at his own head. The entire Saudi paradox was distilled into that cartoon: The country produces, sponsors, shelters and feeds the Islamism that threatens its foundations and its future.

How could this be? One has to go back nearly three centuries to begin to answer this question. Around 1744, a tribal chieftain, Muhammad ibn Saud, formed an alliance with an ultraconservative preacher named Muhammad ibn Abd al-Wahhab and created the first monarchical state on the Arabian Peninsula. On the one hand, there was the Saud family, governing the country by right of blood and succession; on the other, there was Wahhabism, an ultra-puritanical and extreme version of Islam it called the original Islam. A family and a clergy — the whole welded together over the decades as much by oil revenues as by the legitimacy deriving from proximity to Islam’s holiest sites.

But Wahhabism is also, of course, one of the matrices of global jihadism today: an ideological and financial source of the Islamists’ power and their constellation of fundamentalist mosques, television networks dedicated to sermonizing, and various political parties throughout the Muslim world. Saudi Arabia feeds the hand that is killing it, little by little, and other countries as well.

It took the West being heavily hit by Islamist terrorism for it to appreciate fully the measure of this menace, long camouflaged. Indeed, even as Saudi leaders were shaking hands and smiling at their Western counterparts, they were hosting preachers advocating jihad to the hundreds of thousands of people gathered in Mecca for the annual pilgrimage. Today, everyone sees through the facade better.