GROZNY, Russia (Reuters) - At school No. 20 in Russia's troubled region of Chechnya, boys sit on one side of the classroom and girls in headscarves on the other. All are silent as the new teacher rises to speak.
"Do you say your morning prayers?" Islam Dzhabrailov, 21, asks, wearing a green prayer cap and a plain tunic, religious dress that is increasingly popular in the mountainous province in southern Russia's mostly Muslim Caucasus region.
"It's just as important as doing your homework," he tells the students aged 14-15.
One of 420 teachers employed from madrasas to teach history of religion, Dzhabrailov is driving efforts by Chechen leader Ramzan Kadyrov to combat Islamist insurgency by implementing his own brand of Islam. In this Kadyrov has the backing of President Vladimir Putin, though some may harbor doubts about the man.
Against a background of stricter guidance on women's dress and wider acceptance of polygamy, critics say Kadyrov is defying Russian separation of religion and state and pushing Chechnya further from Moscow only a decade after federal troops ousted a separatist leadership there to reinstate Kremlin rule.
In nearby Stavropol, part of the Russian Orthodox heartland, a school principal set off a storm when she forbade a small group of Muslim girls from wearing the hijab to class. Putin weighed in, stressing the need for secular standards in schools.
This year, Russian schools started offering courses in the history of world religions, like Orthodox Christianity and Buddhism; a course on secularism is also offered, reflecting attitudes fostered during the era of the communist Soviet Union.
In Chechnya the lines between history of religion and religious education are being blurred. Dzhabrailov, who says he is deputy director of his school's spiritual-moral department, says the programme is implemented in Chechnya with materials prepared by local religious leaders.
Although officially not mandatory, students and teachers say all pupils are obliged to take the course on Islam, which focuses on the history of Islam and how to behave as a Muslim. Russian media reported that between 99 percent and 100 percent of Chechen students are taking the class.
"A school should provide a secular education, that is what a school is for, and all the more Russian schools," said one teacher at the school who declined to give her name for fear of retribution for speaking out against Kadyrov's policies.
"We have enough madrasas open for those who want a spiritual education," she said.
Critics say the Kremlin has given Kadyrov freedom to enforce Islam as he sees fit and build up his authority in Chechnya in exchange for a clamp-down on insurgents seeking to carve an Islamic state out of the North Caucasus.
Kadyrov has targeted insurgents and sometimes their families with strongarm tactics including kidnappings and torture, rights groups say. In the neighboring region of Dagestan insurgents still wage nearly daily violence.
Kadyrov denies the charges as attempts to blacken his name.
Chechnya established a de facto independent government after a devastating 1994-96 war against Moscow, but federal troops reinstated the Kremlin's authority in a second war in 1999-2000.
While Kadyrov appears to hold separatists under control in his area, Islamist rebels prosecute an armed campaign in neighboring Dagestan to create a sharia-based Muslim state.
Kadyrov, who invited the likes of Gerard Depardieu to a glitzy birthday bash earlier this month, has strengthened his own authority in the region. His father Akhmat was leader of the region until 2004, when he was killed in a bomb attack.
Last year Chechnya's leadership said it wanted state workers dressed in "Muslim clothes", including the hijab for women. They insist it was a "recommendation", but it is strictly followed. Kadyrov himself has publicly supported polygamy.
Earlier this year, barrel-chested Kadyrov, 36, held a meeting with middle school directors and representatives of spiritual authorities to drive home the point of the new class.
"You must make schoolchildren understand the meaning of true Islam. You must understand that this is a huge responsibility," his government's website reported him as saying.
Where Putin uses his ties with the Russian Orthodox Church to galvanise his conservative base, Kadyrov plays to the religious sentiments of the local population to compete ideologically with an insurgency stoked by human rights abuses, poverty and corruption.
Grigory Shvedov, editor of the news portal Caucasian Knot ( www.kavkaz-uzel.ru ), says Kadyrov is trying to turn Grozny into a new center of the Islamic world.
"He wants to be seen not only as the head of a region but an Islamic leader, a Caliph," he said.
"The problem for the Kremlin is the more Chechnya develops as the religious center of the Caucasus and Russia, the further it moves away from Moscow," he said.
Kadyrov sought to raise his Islamic credentials earlier this year by bringing what he said were relics of Prophet Muhammad to Grozny where they were displayed to men for three days and to women for one. Since then he has said he will remain the guardian of the relics, which include strands of what he deems to be the prophet's beard.
Kremlin officials do not express worry in public over the increasing role Islam has played and analysts say Kadyrov will remain loyal to Putin.
But the very personal nature of their relationship is also its weakness, said Alexander Mukhin, head of the Moscow-based Center for Political information.
"Putin depends on Kadyrov and Kadyrov on Putin. The relationship between Chechnya and Moscow depends directly on that personal relationship and if either of them were, God forbid, not to be in power, then that relationship could change drastically," he said.
SCHOOL NO. 20
In School No. 20, Dzhabrailov said the region's top Muslim leader has decided who will serve in the schools. But he says his position "was created by ... Ramzan Kadyrov himself".
"The authority is given to us not only to teach but to look after the moral upbringing of the students of the school. We as spiritual mentors, have the ability to recommend activities of the teachers," he said.
"All of that for example allows me to control the appearance of the female half of the school," he said.
In class, students yell out answers to questions that he poses. He tells girls that they should not interrupt boys, "even if they are wrong".
Like many buildings in the Chechen capital of Grozny, School No. 20 is sparkling new.
The city was almost entirely rebuilt after the two wars that nearly destroyed it. With Kremlin funds, the city is now spotless, and construction projects like business centres and hotels are sprouting, though rarely occupied.
A big new mosque occupies a prominent place.
In schools the dress code for girls is a headscarf. In universities Kadyrov has outlawed the use of the hijab among female students, but a recent trip to campus proved many women still wear them along with long skirts.
New public buildings throughout the region are being built with what locals say are mandatory prayer rooms.
In a region where violence and authority have been linked since the fall of the Soviet Union, the classes on Islam appear to be gaining traction.
"I love going to class on the history of Islam and I want to understand Islam better in a local madrasa," said a student who identified herself as Malika.
"I used to not be able to picture myself in a headscarf ... but now I'm already used to it."
Dzhabrailov says that the teaching of Islam is necessary among the students to stop the spread of religious fundamentalism, which he said has led to Arab Spring revolts across the Middle East and North Africa.
"We don't teach radical Islam. And we don't decrease the freedoms (of our students) as it may appear. It's simply the proper upbringing of a Muslim Chechen society."
(Writing by Thomas Grove; editing by Ralph Boulton)