PARIS -- The jihadi employment form asked the recruits, on a scale of 1 to 3, to rate their knowledge of Islam. And the Islamic State applicants, herded into a hangar somewhere at the Syria-Turkey border, turned out to be overwhelmingly ignorant.

The extremist group could hardly have hoped for better.

At the height of Islamic State's drive for foot soldiers in 2013 and 2014, typical recruits included the group of Frenchmen who went bar-hopping with their recruiter back home, the recent European convert who now hesitantly describes himself as gay, and two Britons who ordered "The Qur'an for Dummies" and "Islam for Dummies" from Amazon to prepare for jihad abroad. Their intake process complete, they were grouped in safe houses as a stream of Islamic State imams came in to indoctrinate them, according to court testimony and interviews by The Associated Press.

"I realized that I was in the wrong place when they began to ask me questions on these forms like 'when you die, who should we call?"' said the 32-year-old European recruit, speaking to the AP on condition of anonymity for fear of reprisals. He said he thought he was joining a group to fight President Bashar Assad and help Syrians, not the Islamic State.

The European, whose boyish demeanour makes him appear far younger than his age, went to Syria in 2014. He said new recruits were shown IS propaganda videos on Islam, and the visiting imams repeatedly praised martyrdom. Far from home, unschooled in religion, having severed family ties and turned over electronic devices, most were in little position to judge.

An AP analysis of thousands of leaked Islamic State documents reveals most of its recruits from its earliest days came with only the most basic knowledge of Islam. A little more than 3,000 of these documents included the recruit's knowledge of Shariah, the system that interprets into law verses from the Qur'an and "hadith" -- the sayings and actions of the Prophet Muhammad.

According to the documents, which were acquired by the Syrian opposition site Zaman al-Wasl and shared with the AP, 70 per cent of recruits were listed as having just "basic" knowledge of Shariah -- the lowest possible choice. Around 24 per cent were categorized as having an "intermediate" knowledge, with just 5 per cent considered advanced students of Islam. Five recruits were listed as having memorized the Qur'an.

The findings address one of the most troubling questions about IS recruitment in the United States and Europe: Are disaffected people who understand Shariah more prone to radicalization? Or are those with little knowledge of Islam more susceptible to the group's radical ideas that promote violence?

The documents suggest the latter. The group preys on this religious ignorance, allowing extremists to impose a brand of Islam constructed to suit its goal of maximum territorial expansion and carnage as soon as recruits come under its sway.

Islamic State's most notorious new supporters appear to have an equally tenuous link with religion. Mohamed Lahouaiyej Bouhlel, who killed 85 people by plowing a truck into a Bastille Day crowd in Nice, France, was described by family and neighbours as indifferent to religion, volatile and prone to drinking sprees, with a bent for salsa dancing and a reported male lover.

Unlike Omar Mateen, the Orlando attacker, Bouhlel did not make a public declaration of allegiance to Islamic State, much less prove he had direct ties to extremists in the war zone. Still, the group was quick to claim both as foot soldiers.

------

The AP analyzed the IS entry form documents of around 4,030 foreign recruits who crossed into Syria when the group was rapidly expanding and seizing territory in Iraq and Syria in 2013 and 2014. At that time, the CIA estimated the extremist group had between 20,000 and 31,500 fighters across Iraq and Syria.

Among the documents were forms for nine of 10 young men from the eastern French city of Strasbourg, all recruited by a man named Mourad Fares. One of them, Karim Mohammad-Aggad, described barhopping in Germany with Fares. He told investigators that IS recruiters used "smooth talk" to persuade him.

He'd travelled with his younger brother and friends to Syria in late 2013. Two died in Syria, and within a few months, seven returned to France and were arrested. Mohammad-Aggad's brother, 23-year-old Foued, returned to Paris and was one of the three men who stormed the Bataclan in a night of attacks Nov. 13 that killed 130 people.

"My religious beliefs had nothing to do with my departure," Karim Mohammad-Aggad told the court, before being sentenced to nine years in prison. "Islam was used to trap me like a wolf," he said.

IS data shows Karim and his brother Foued were among eight in the Strasbourg group listed as having "basic" knowledge of Sharia.

Expressing a common sentiment shared by many Europeans of North African descent, Mohammed-Aggad told the court he felt like an immigrant in Algeria and "a dirty Arab" in France. After just a few months in Syria, he said he left IS because he was treated by the extremists as an "apostate" -- someone who had renounced his religion.

When pressed by the judge on his knowledge of Shariah and how the IS group implements it, Mohammad-Aggad, a former gas station attendant, appeared dumbfounded, saying repeatedly: "I don't have the knowledge to answer the question."

One of his co-defendants, Radouane Taher, was also pressed by the judge on whether beheadings carried out by the IS group conformed to Islamic law.

He couldn't say for sure, answering: "I don't have the credentials."

That's where Amazon comes in.

The trial of longtime friends Mohammed Ahmed and Yusuf Sarwar, from the British city of Birmingham, revealed the 22-year-olds had ordered "The Qur'an for Dummies" and "Islam for Dummies" books in preparation for their trip to join extremists in Syria. They were arrested on their return to Britain and convicted in 2014 of terrorism offences.

Patrick Skinner, a former CIA case officer with extensive experience with Mideast extremist organizations, said some people claim allegiance to IS out of religious belief, but that most who join, including those from the West, are people "reaching for a sense of belonging, a sense of notoriety, a sense of excitement."

"Religion is an afterthought," said Skinner, who is also director of special projects at security consultancy the Soufan Group.

Those who truly crave religious immersion would go to Al-Azhar in Cairo, he added, referring to the thousand-year-old seat of learning for Shariah and Quranic studies.

In its recent English language magazine Dabiq, dedicated largely to bolstering its own Muslim credentials, Islamic State dismissed Al-Azhar as part of an "approach to subdue Muslims through appeasement," with the West.

Mohammed Abdelfadel, an Islamic scholar who heads a German-language unit at Al-Azhar that tracks Islamic State propaganda and statements, said the group spews superficial notions about what is "halal and haram," or what is permissible and forbidden in Islam. He says the group's propaganda videos lionize IS fighters as masculine, strong martyrs going to heaven for the sake of God -- counter to Islamic laws that forbid terrorism, the murder of non-combatants in war, the imposition of Islam on non-Muslims and other criminal activity.

--------

The recruits' Shariah knowledge is important because IS not only needs soldiers and suicide bombers, but administrators and Shariah officials to oversee its local courts and judges, who in turn promote IS ideology.

It also matters because those who've claimed advanced knowledge in Shariah on the IS entry documents were less likely to want to become suicide bombers, according to a study by the U.S. military's Combating Terrorism Center, an academic institution at the United States Military Academy.

"If martyrdom is seen as the highest religious calling, then a reasonable expectation would be that the people with the most knowledge about Islamic law (Shariah) would desire to carry out these operations with greater frequency," said the report.

However, despite the religious justification that IS uses for suicide missions, "those with the most religious knowledge within the organization itself are the least likely to volunteer to be suicide bombers," the study found.

Islamic scholar Tariq Ramadan said a close look at the IS group's top commanders shows that many had no religious credentials but, instead, they once held senior positions under Saddam Hussein's secular Baathist government.

Ramadan teaches Islamic Studies at Oxford and has written numerous books on Islam and the integration of Muslims in Europe. He says Muslim scholars must demonstrate that what IS teaches is wrong.

"The people who are doing this are not experiencing martyrdom, they are criminals. They are killing innocent people. Nothing in Islam, nothing ever can justify the killing of innocent people, never, ever."

The gay European recruit said he converted to Islam because he was interested in the culture and it was easy.

"It only required one prayer and no prior understanding of Islam," he said. "There was no hierarchy and it was all about living a good life."

As a convert with almost no knowledge in Islam, he says he was easy prey.

"People like me were tricked into something that they didn't understand. I never meant to end up with IS."