In pro-Western Jordan, a leader in the fight against Islamic State militants, school books warn students they risk "God's torture" if they don't embrace Islam. They portray "holy war" as a religious obligation if Islamic lands are attacked and suggest it is justified to kill captured enemies.

Christians, the country's largest minority, are largely absent from the texts.

The government says it's tackling the contradiction between official anti-extremist policy and what is taught in schools and mosques by rewriting school books and retraining thousands of teachers and preachers.

Critics say the reforms are superficial, fail to challenge hard-line traditions, and that the first revised textbooks for elementary-school children still present Islam as the only true religion.

"Islamic State ideology is there, in our textbooks," said Zogan Obiedat, a former Education Ministry official who published a recent analysis of the texts. If Jordan were to be overrun by the militants, a large majority "will join IS because they learned in school that this is Islam," he said.

Government officials insist they are serious about reform.

The rewritten books will teach "how to be a moderate Muslim, how to respect others, how to live in an environment that has many nationalities and different ethnic groups," said Education Minister Mohammed Thnaibat.

Thnaibat refused to discuss hard-line passages in the unrevised books, but said there are limits to reform. Jordan is an Islamic country, he said, and "you cannot go against the culture of the society."

Success or failure of the effort matters in a region engaged in what Jordan's King Abdullah II has framed as an existential battle with IS militants who control large areas in Syria and Iraq. Abdullah has emerged as one of the most outspoken Arab leaders urging Muslims to reclaim their religion from extremists.

Reform efforts target both schools and mosques.

All school books are to be rewritten over the next two years, said Thnaibat. Lesson plans will shift from rote learning to critical thinking, and tens of thousands of teachers will be retrained. Revised books for grades 1-3 are already in use, and 11,000 teachers were given monthlong courses to deliver the new curriculum.

Among preachers, the government hopes to promote a "moderate Islamic ideology that is in line with our national principles," said the religious affairs minister, Haeli Abdul Hafeez Daoud.

As part of the campaign, the ministry suspended several dozen imams because of the content of their sermons.

The country has only 4,500 preachers for its 6,300 mosques, including many who are not properly trained, creating a vacuum that has enabled extremist lay preachers to step in, Daoud said. Yet a program to retrain thousands has enrolled only about 100 preachers in a three-semester course for which 340 were approached.

The spread of extremist ideas has been a growing concern in Jordan since the 2011 Arab Spring uprisings and subsequent conflicts involving militants, including in Syria and Iraq.

Experts say about 10,000 Jordanians, including hundreds fighting in Syria and Iraq, adhere to Jihadi Salafism, the ideology that underpins the al-Qaida terror network and Islamic State group, its increasingly more influential rival.

Daoud said that at one point, such ideas had a "huge and dangerous" impact in Jordan, but that appeal of IS has waned since the extremists immolated a captured Jordanian fighter pilot earlier this year.

Some argue militancy grows from poverty and unemployment, and that the government has done little to address the root causes.

"Extremism does not appear because preachers call for it," said Mohammed Abu Rumman, an expert on Islamic militants. "It appears because we have young people who search for identity and revolt against the situation."

For now, the anti-extremism campaign is being led by the security forces.

Some 300 people are currently in custody in Jordan for alleged IS sympathies, including 130 who have been sentenced, defense lawyer Moussa al-Abdalat said. About half are in detention for expressing support for IS ideas on social media, he said. Those convicted of "electronic terrorism" are sent to prison for five to seven years.

Critics say these very ideas are taught in Jordan's schools.

Obeidat and Dalal Salameh, an analyst at the Jordan Media Institute and a former school teacher, point to what they said are particularly problematic passages in school books.

An eighth-grade Islamic Studies text tells students that "jihad is a must for every Muslim" if an enemy attacks or occupies an Islamic land. Jihad is also required if "any power ... prevents us from conveying the message of Islam, or attacks Muslims or their countries." Those participating in jihad go straight to heaven.

A ninth-grade book describes a battle in which an army led by the Prophet Muhammad executes all captured men and enslaves women and children. The story, cited by some IS supporters in justifying the extremists' brutal methods, is presented without context. The authors write that the story illustrates the need for "decisiveness in punishing traitors."

Sixth-graders learn that those who don't embrace Islam will face "God's torture" and the "pit of hell."

The punishment for adulterers is death by stoning. Birth control violates Islam. So does trying to "imitate" Jews or Christians in their customs or dress, or joining them in celebrating religious holidays. Slavery is not forbidden, the books say, but Muslims should treat slaves well and free them when possible. Arab nationalism is bad because it weakens adherence to Islam. Wives must obey husbands and not leave the house without permission.

Salameh said the revised textbooks for grades 1-3 still fall short.

"They still divide the world for children into Muslims and non-Muslims," she said. "They still teach children that any other religion and way of thinking is false."

Father Rifat Bader, a Catholic priest who also reviewed the textbooks, said Christians are still not mentioned in the new books. "In this burning region, we have to promote mutual respect," he said. "How can you do that if you don't mention that there are others (non-Muslims) in this society?"

An Associated Press comparison of the old and new textbooks found no significant differences in content, though the new books were organized in a way that made it easier for students to understand the material.

There has been a backlash to the reform efforts. The Muslim Brotherhood, the country's largest opposition group, alleges the textbook revisions are funded by the West to make Jordan more secular.

In mosques, moderate preachers compete with extremist ideas promoted on YouTube and other social media.

Ibrahim Nael, an imam in the working class town of Ruseifa near Amman, said he signed up for the government course to be able to deliver stronger religious arguments when debating IS sympathizers.

"You get lots of young people who are enthusiastic to go and fight in the ranks of these groups in Iraq and Syria, without knowing if these groups are right or wrong," he said. "Lots of people who received my preaching in the mosque changed their minds and cleaned up their confusion."

Nael, 40, a lay preacher with a vocational high school education, lacks formal religious training — not an unusual biography for imams in Jordan.

The Muslim Brotherhood alleges that the lack of qualified preachers is a result of barring Brotherhood supporters with the right preaching credentials from the pulpit, opening the door to extremist amateurs.

Only now has the government "discovered that those (Salafis) are a threat and stopped them," said Hamza Mansour, a leading figure in the Brotherhood, which considers the Islamic State group too extreme.

Others say the authorities act mainly against preachers who criticize the monarchy or the security forces. "All the government institutions are trying to do here is to assert loyalty to the regime," said Hassan Abu Haniyeh, an expert on Islamic militants.

Sheik Mohammed al-Wahsh, an imam at a large mosque in Amman, said he was suspended from preaching late last year after he criticized Jordan's handling of a conflict with Israel over a contested Muslim holy site in Jerusalem.

Al-Wahsh, who continues to receive a salary for other mosque-related duties, said it's his second suspension since 2000, when he criticized the Jordanian military.

The security forces "don't call you unless you criticize the king," said Awad Abu Ma'aita, a pro-Brotherhood preacher in the southern town of Karak.

Imam Zaki al-Soub promotes ultra-conservative Salafi ideas in his sermons at a mosque in Karak. But in contrast to the Islamic State group's violent Salafism, the 36-year-old al-Soub calls for loyalty to the government to avoid bloodshed.

One of the government's star preachers, Abdel Fattah al-Madi, is a Syrian refugee who has delivered sermons about tolerance at a number of mosques since coming to Jordan two years ago.

Al-Madi, who teaches in the government's training course, said he draws large crowds each Friday as word spreads about his liberal attitude. He said moderates can win the war of ideas, but that young people drawn to extremism also need practical alternatives, including jobs.

Others were pessimistic.

Abu Rumman said only a political and economic overhaul would defeat extremism.

"The absence of democracy and reform, these issues are the conditions for raising extremism in the Arab world, and in Jordan in particular," he said.