BAGHDAD — Caliph Ibrahim, the leader of the Islamic State, appeared to come out of nowhere when he matter-of-factly proclaimed himself the ruler of all Muslims in the middle of an otherwise typical Ramadan sermon. Muslim scholars from the most moderate to the most militant all denounced him as a grandiose pretender, and the world gaped at his growing following and its vicious killings.

His ruthless creed, though, has clear roots in the 18th-century Arabian Peninsula. It was there that the Saud clan formed an alliance with the puritanical scholar Muhammed ibn Abd al-Wahhab. And as they conquered the warring tribes of the desert, his austere interpretation of Islam became the foundation of the Saudi state.

Much to Saudi Arabia’s embarrassment, the same thought has now been revived by the caliph, better known as Abu Bakr al-Baghdadi, as the foundation of the Islamic State.

“It is a kind of untamed Wahhabism,” said Bernard Haykel, a scholar at Princeton. “Wahhabism is the closest religious cognate.”