In his battle against militant Islam, Egyptian President Abdel Fattah al-Sisi is relying not just on bomber planes and soldiers but on white-turbaned clerics from Al-Azhar, Egypt's 1,000-year-old center for Islamic learning. He wants clerics to counter radicalism in the classroom.
In a televised speech in January at an Al-Azhar conference centre in Cairo, Sisi called for "a religious revolution" in Islam. Radicalized thinking, he told the audience of Islamic scholars, had become "a source of anxiety, danger, killing and destruction for the rest of the world."
That had to change - and the scholars had a leading role to play, in schools, mosques and on the airwaves.
"You, imams, are responsible before Allah. The entire world is waiting. The entire world is waiting for your next word because this nation is being torn apart."
Surprised by the president's bluntness, the scholars went "white as sheets," some of those in the audience told a Western official.
The president's warning is part of a much larger project. To contain the radical Islamist movement roiling his nation, Sisi has most conspicuously been using the law and brute force. But he is also promoting a more moderate and less politicised version of the faith.
In that struggle the Al-Azhar institution is one of the most important fronts for Sisi - and for the wider region. The outcome of the struggle in Egypt, the intellectual and cultural capital of the Arab world, has ramifications far beyond its borders.
The Al-Azhar mosque was built in the 10th century and is one of the oldest in Egypt. It opened a university that spread Shi'ite Islam until the end of the Fatimid Caliphate in 1171. It later turned into a Sunni mosque and university that taught the four schools of mainstream Sunni Islam.
Today the university's various faculties and research centres have 450,000 students, many from countries across Asia and Africa. It also has a network of more than 9,000 schools across Egypt attended by more than 2 million students.
Al-Azhar's teachers, preachers, and researchers have so far introduced a few small changes. They include tweaking text books and setting up an online monitoring centre to track militant statements on social media so the institute can better refute them. But there is no detailed reform programme yet, and Al-Azhar officials openly acknowledge the magnitude of the challenge ahead.
To be successful, Sisi will need to achieve what many before him have not: balancing tough security measures with education to encourage a more moderate version of Islam. Past experiences in Egypt, Syria, Algeria, and Iraq show that attempts to crack down on extremism can also stoke it. So far the results of Sisi's drive have been mixed.
The president is deeply religious and has a mark on his forehead from years of pressing his head to the carpet in daily prayer. His wife and daughter wear the veil. His reputation for piety was so well known that his predecessor, Mohamed Morsi, a leading figure in the Muslim Brotherhood and Egypt's first freely-elected president, appointed him army chief in August 2012.
Yet Sisi was also bold enough to seize power from Morsi after the Brotherhood leader became increasingly unpopular. Since then, he has cracked down hard on the Brotherhood. Hundreds of the group's supporters have been killed, and thousands jailed. This month a Cairo court recommended the death sentence for Morsi in connection with a mass jail break in 2011.
Balancing that sort of force with a message of moderation is difficult. Some students at Al-Azhar say they are deeply sceptical of the institution, and of the government's plans. Many dismiss Al-Azhar as a mouthpiece for the state, which favours the military and political elites over the poor masses where militants find most of their recruits.
Some students told Reuters the security crackdown was counterproductive. Cairo's heavy-handed tactics, they say, are radicalising people who may have been open to a message of moderation.
Western officials praise Sisi's calls for action but question whether he has any real plan. "There's a kernel of a very big idea in what Sisi wants to do," said one. "But his vision of it is not exactly clear and it's not clear how it will be implemented."
Critics say Al-Azhar's Grand Imams have long issued religious edicts in support of government policy. During the time of Hosni Mubarak, Egypt's president for three decades until his overthrow in 2011, the Grand Imam was appointed by presidential decree.
The military government that took over from Mubarak gave Al-Azhar more independence. It allowed an Al-Azhar committee to elect the Grand Imam, though the winner still had to be ratified by presidential decree.
When Morsi came to power in 2012, Al-Azhar criticised his policies and accused the Brotherhood of trying to place its own men into top teaching positions. By contesting and winning faculty seats, the Brotherhood ultimately did gain some influence in the institution.
Since Sisi seized power, though, Al-Azhar has purged Morsi-era professors and teachers, and returned to an appointment system in which the state plays a major role. It has also publicly backed Sisi's crackdown on the Brotherhood and militants. Al-Azhar's Grand Imam, Ahmed al-Tayeb, was one of a few public figures who flanked Sisi as he announced the military takeover in 2013 after days of mass protests against Morsi.
The university has issued new rules stating that any student or faculty member who incites, supports or joins in protests that disrupt learning or promote rioting or vandalism will be expelled or fired.
Beginning in 2013, Al-Azhar also started to simplify its curriculum to make it more compatible with the modern age, said Abbas Shuman, Al-Azhar deputy head. School text book passages describing the spoils of war and slavery have been removed, he said, because they were applicable during the Muslim conquests but are now considered out of date.
An introduction to an online version of a book on Islamic theology now reads: "We present this scientific content to our sons and daughters and ask God that he bless them with tolerance and moderate thought ... and for them to show the right picture of Islam to people."
Sitting in Al-Azhar's headquarter in old Cairo, Shuman said that such changes are reasonable. "Al-Azhar is built on Islamic heritage. But not all of it is sacred," he said.
The university insists that students should not read old religious texts without guidance. And Professor Abdel Fattah Alawari, dean of the Islamic theology faculty at Al-Azhar, said specialised panels had also been created to review books written by professors to make sure they do not lean towards extremism.
Clerics are also trying to modernise methods of communication. Al-Azhar recently started a YouTube channel to counter Islamist propaganda with its own, and has begun using social media to condemn Islamic State atrocities. Sheikhs from Al-Azhar have embarked on tours of youth centers around the country to promote moderate thought and discourage radicalism.
Abdel Hay Azab, president of Al-Azhar's university, said: "Al-Azhar university educates scientists, preachers, doctors and engineers. So when Al-Azhar provides its educational services to society, it has to be with the right vision for religion, which is that religion should not be seen as an obstacle in society."
The reforms have not been universally welcomed. Al-Azhar's university campuses saw several violent pro-Brotherhood protests after Morsi was deposed. Some students are opposed to changes to the curriculum.
Yousef Hamdi, a third year student studying Islamic theology, said he was upset that he has not been taught the four mainstream schools of thought on Sunni learning and the differences between them. They include rulings by early prominent clerics such as "using force against oppression and rejecting the ruler."
Like some other students, he feels the reforms mean he is not being taught the full teachings of Islam. The result, Hamdi said, is that some students now seek out books that teach what they feel is pure and traditional Islamic jurisprudence.
"A number of students have become radicalised as a result of that, because they turned to these texts on radicalisation without aid and instruction from Al-Azhar," he said.
Another student, who met with Reuters in the Cairo metro to avoid detection by security services, said the move to a softer version of fiqh - the interpretation of Islamic Sha'ria law - has made people angry. "They want to change the curriculum ... They've turned it into 'fiqh-lite'," he said.
Shuman, Al-Azhar's deputy head, said the curriculum changes have not weakened the fiqh taught. "Sha'ria law allows for rulings that are no longer applicable to the modern age to be reviewed to make it more suitable for this age," he said.
But H.A. Hellyer, a nonresident fellow at the Brookings Institution in Washington, questioned Al-Azhar's approach. "The students need to be able to contextualise those references properly ... Otherwise they'll end up being susceptible to radicals who'll give them those references, but in a monumentally flawed fashion," he said.
It is not hard to find radical texts. Just outside Al-Azhar mosque in Cairo's old quarter, a maze of alleyways is filled with scores of bookshops that sell both mainstream Islamic titles and books by more extreme Islamist scholars, including Ibn Taymiyya and Sheikh Kishk.
One booklet by Ibn Taymiyya contains stand-alone statements such as "Honesty in faith is not complete without jihad for the sake of God." More moderate Islamic scholars have criticised such statements because they lack any context for when jihad is justified.
Bookshop owners said that they even quietly sell books by Sayyid Qutb, an Egyptian Brotherhood leader in the middle of last century who is widely seen as the father of modern radical Islamist ideology.
Downside of tough action
The security crackdown may be undermining the attempted education reforms, hardening the outlook of students already sympathetic to Islamists and ostracizing some moderates.
Take the 18-year-old Al-Azhar student who goes by the nickname Abu Obeida al-Ansari. The teenager attended Al-Azhar schools from his early years. Two years ago he joined protests in Cairo against Sisi. The protesters were angry about the fierce security crackdown that killed scores of Brotherhood members and sympathisers. The teenager was later arrested, he said, for standing next to a Brotherhood member in the street as security forces closed in.
Ansari told Reuters via Facebook that Al-Azhar was wrong to back Sisi. He said the institution is "penetrated" by Egypt's security agencies and pro-government thinking, and that it teaches about Sha'ria Islamic law but doesn't implement it.
Ansari said he had also grown disillusioned with the Brotherhood, which he believes buckled too easily under state pressure. He wants to join Islamic State, he said, "whether in Libya, Syria or Iraq, and then return to Egypt to take revenge on every apostate in the army and police who killed and arrested my friends."
He added: "Everybody ought to join jihad ... I learned that from my research, the Fiqh I studied ... and Islamic State fatwas."
Islam Yehya, who is studying Islamic theology at Al-Azhar university, is also angered by Sisi's security crackdown. Security forces, he said, "believe that all Al-Azhar students are terrorists or Brotherhood members. And the truth is that Al-Azhar has Brotherhood, Salafists, liberals and secularists and people who don't know anything about politics."
The tough tactics spark a deep hatred for the police, he said. "Two of my university friends travelled to Syria to join terrorist cells after they were tortured for two months in detention," said Yehya, who spoke at a rundown cafe in Cairo's Nasr City district.
Egypt's government denies allegations of human rights abuses and says the Brotherhood, Islamic State and al-Qaeda pose a grave threat to Egypt.
At the same time, security sources say authorities do target universities. One police officer told Reuters that "most of Al-Azhar students are under suspicion" and are regularly monitored. Depending on what is detected, students are either subjected to further monitoring or it is stopped.
"Al-Azhar students have the tendency (towards extremism) and are usually a fertile ground to be deceived into joining terrorist cells," the officer said.
Others also take a tough line. Abdul Ghani Hendi, a religious affairs adviser in the Egyptian parliament, thinks Al-Azhar should be completely restructured to allow for self-criticism.
"All the thought which dominates the society is extremists' thoughts. We should confess that frankly," he said.
In April, an official at the Education Ministry burned books in the courtyard of a private school, saying the literature included Islamic texts that incited violence. The action sparked ridicule from Islamists and secularists alike, who pointed out that some of the burned books had nothing to do with Islam.
Nevertheless, Sisi remains committed to his drive against militancy and thinks Al-Azhar can do more to promote a moderate form of Islam. In a recent speech, he said: "We need to move faster and more effectively."