CAIRO – Three British schoolgirls believed to have gone to Syria to become "jihadi" brides. Three young men charged in New York with plotting to join the Islamic State group and carry out attacks on American soil. A masked, knife-wielding militant from London who is the face of terror in videos showing Western hostages beheaded.
They are among tens of thousands of Muslims eager to pledge allegiance to the Islamic State group. An estimated 20,000 have streamed into the territory in Iraq and Syria where the group has proclaimed what it calls a "caliphate" ruled by its often brutal version of Islamic law.
But how rooted in Islam is the ideology embraced by this group that has inspired so many to fight and die?
President Barack Obama has insisted the militants behind a brutal campaign of beheadings, kidnappings and enslavement are "not Islamic" and only use a veneer of Islam for their own ends. Obama's critics argue the extremists are intrinsically linked to Islam. Others insist their ideology has little connection to religion.
The group claims for itself the mantle of Islam's earliest years, purporting to recreate the conquests and rule of the Prophet Muhammad and his successors. But in reality its ideology is a virulent vision all its own, one that its adherents have created by plucking selections from centuries of traditions.
The vast majority of Muslim clerics say the group cherry picks what it wants from Islam's holy book, the Quran, and from accounts of Muhammad's actions and sayings, known as the Hadith. It then misinterprets many of these, while ignoring everything in the texts that contradicts those hand-picked selections, these experts say.
The group's claim to adhere to the prophecy and example of Muhammad helps explain its appeal among young Muslim radicals eager to join its ranks. Much like Nazi Germany evoked a Teutonic past to inspire its followers, Islamic State propaganda almost romantically depicts its holy warriors as re-establishing the caliphate, contending that ideal of Islamic rule can come only through blood and warfare.
It maintains its worst brutalities — beheading captives, taking women and girls as sex slaves and burning to death a captured Jordanian pilot — only prove its purity in following what it contends is the prophet's example, a claim that appalls the majority of the world's 1.6 billion Muslims.
Writings by the group's clerics and ideologues and its English-language online magazine, Dabiq, are full of citations from Quranic verses, the Hadith and centuries of interpreters, mostly hard-liners.
But these are often taken far out of context, said Joas Wagemakers, an assistant professor of Islamic Studies at Radboud University Nijmegen in the Netherlands, who specializes in Islamic militant thought.
Muslim scholars throughout history have used texts in a "decontextualized way" to suit their purposes, Wagemakers said. But the Islamic State goes "further than any other scholars have done. They represent the extreme," he said.
It would be a mistake to conclude the Islamic State group's extremism is the "true Islam" that emerges from the Quran and Hadith, he added.
Despite its claim to the contrary, the Islamic State group is largely political, borne out of the conflicts in Syria and Iraq, said Khaled Abou El Fadl, an Islamic law scholar at the University of California, Los Angeles.
The group, he said, is trying to make God "a co-conspirator in a genocidal project."
Ahmed al-Dawoody, an assistant professor at the Institute for Islamic World Studies at Zayed University in Dubai, agreed.
The phenomenon of reading religious sources out of context "has existed throughout the ages," he said. "We should not grant any legitimacy to those who violate Islam, then hijack it and speak on its behalf."
"This is not Islamic terror, this is terror committed by Muslims," he said.
IS not only misreads the texts it cites, most clerics say, it also ignores Quranic verses and a long body of clerical scholarship requiring mercy, preservation of life and protection of innocents, and setting out rules of war — all of which are binding under Islamic Shariah law.
Many mainstream clerics compare the group to the Khawarij, an early sect that was so notorious for "takfir," or declaring other Muslims heretics for even simple sins, that it was rejected by the faith. The Islamic State group denies that, but it draws heavily from 20th-century theories of "takfir" developed by hard-liners.
Part of the problem in countering the group's ideology is that moderate clerics have struggled to come up with a cohesive, modern interpretation, especially of the Quranic verses connected to Muhammad's wars with his enemies.
Militants often point to the Quran's ninth sura, or chapter, which includes calls for Muslims to "fight polytheists wherever you find them" and to subdue Christians and Jews until they pay a tax. Moderate clerics counter that these verses are linked to specifics of the time and note other verses that say there is "no force in religion."
And while moderate clerics counter the Islamic State group's interpretation point-by-point, at times they accept the same tenets.
Sheikh Ahmed el-Tayeb — the grand imam of Egypt's Al-Azhar, one of Sunni Islam's most prestigious seats of learning — denounced the burning of the Jordanian pilot as a violation of Islam. But then he called for the perpetrators to be subjected to the same punishment that IS prescribes for those who "wage war on Islam" — crucifixion, death or the amputation of hands and legs.
This turns the debate into one over who has the authority to determine the "correct" interpretation of Islam's holy texts. Since many of the most prominent clerics in the Middle East are part of state-run institutions, militant supporters dismiss them as compromised and accommodating autocratic rulers.
The Islamic State group's segregation of the sexes, imposition of the veil on women, destruction of shrines it considers heretical, hatred of Shiites and condoning of punishments like lashings or worse are accepted by clerics in U.S.-allied Saudi Arabia, who follow the ultraconservative Wahhabi interpretation of Islam.
But IS goes further.
For example, most militaries in the era of Muhammad — the 7th century — beheaded enemies and enslaved populations they captured in war, including taking women as concubines. There are citations in the Hadith of Muhammad or his successors ordering beheadings, and verses in the Quran set out rules for dealing with slaves.
Pivoting off these, the Islamic State group contends that anyone who rejects beheadings or enslavement is not a real Muslim and has been corrupted by modern Western ideas.
One Islamic State cleric, Sheikh Hussein bin Mahmoud, wrote a vehement defense of beheadings after the killing of American journalist James Foley.
"Those who pervert Islam are not those who cut off the heads of disbelievers and terrorize them," he wrote, "but those who want (Islam) to be like Mandela or Gandhi, with no killing, no fighting, no blood or striking necks."
Islam, he wrote, is the religion "of battle, of cutting heads, of shedding blood."
To support beheadings, the group cites the Quran as calling on Muslims to "strike the necks" of their enemies. But other clerics counter the verse means Muslim fighters should swiftly kill enemies in the heat of battle, and is not a call to execute captives. Moreover, IS ignores the next part of the verse, which says Muslims should set prisoners of war free as an act of charity or for ransom.
The Islamic State group "appears to have adopted violent ideas first, then searched books of religious interpretation to find a cover for their actions," said Sheikh Hamadah Nassar, a cleric in the ultraconservative Salafi movement.
In June, the extremists declared a caliphate, or "khilafa" in Arabic, in the lands it controls in Iraq and Syria, with its leader Abu Bakr al-Baghdadi as the caliph — a declaration roundly ridiculed by Muslim clerics of all stripes. But here too, the group went further, saying that Islam requires the existence of a caliphate and anyone who refuses to recognize its declaration is not a true Muslim.
"The hopes of khilafa became an undeniable reality," the group proclaimed in its online magazine, Dabiq. Any Muslim who refuses IS authority will be "dealt with by the decisive law of Allah."
After that, the stream of IS recruits swelled by thousands.
AP Religion Writer Rachel Zoll contributed to this report.