Abdel Fattah al-Sisi, the former army chief who deposed the Brotherhood's Mohamed Mursi and is expected to be elected president later this month, has cast himself as a defender of religion and taken aim at the doctrinal foundations of Islamist groups the state is seeking to crush.
Striking a pious tone that sets him apart from former president Hosni Mubarak, Sisi also appears to be taking on the mantle of a religious reformer. He has blamed outdated "religious discourse" for holding back Egypt.
"I see that the religious discourse in the entire Islamic world has cost Islam its humanity," Sisi said in an interview televised on May 5. "This requires us, and for that matter all leaders, to review their positions."
With references to God and morality, Sisi may turn out to be the most outwardly pious of any of the military men to have governed Egypt since the republic was founded in 1953.
This does not mean he will inject more Islam into the government of a state whose laws and culture have long been shaped by religion. Sisi has said there is no such thing as a "religious state" - challenging a central Islamist concept.
But he seems certain to encourage the role played by religion in the public life of this conservative society.
And as the authorities try to curb Islamist influence by tightening control over mosques, Sisi's presidency could bring a sustained effort to reinforce state-backed, apolitical Islam, providing clerical cover for destroying his Islamist foes.
"He is trying to replace the Islamists and counter the Muslim Brotherhood's argument that he is anti-Islam," said Khalil al-Anani, an expert on Islamic movements based at Johns Hopkins University in the United States.
"There is a religious aspect to his character and at the same time it is a political tool to strengthen his popularity and legitimacy among conservative Egyptians," he said.
"He has some kind of religious vision for society."
Sisi has been compared with Anwar Sadat, the head of state known for his piety who was assassinated by Islamists in 1981. Like Sadat, Sisi has a mark on his forehead from years of pressing his head to the carpet in daily prayer. His wife wears an Islamic veil.
TURNING AGAINST THE BROTHERHOOD
Sisi's reputation for piety encouraged the Brotherhood to believe he could be a reliable ally, one of the reasons Mursi appointed him army chief in August, 2012. But Sisi revealed strongly anti-Brotherhood views after deposing Mursi following mass protests against Mursi's rule less than a year later.
Sisi accused the group of having an ideology which claimed to hold the "exclusive truth" and of seeking to advance the cause of an Islamic empire rather than of Egypt.
In the interview screened on May 5, Sisi said violent groups were a front for the Brotherhood, vowing that the movement would not exist once he was in power.
The movement, most of whose leaders are in jail, has yet to respond to his most recent accusations, though it has previously denied such claims and says it has long rejected violence. The group sees Sisi as the mastermind of a bloody military coup.
Islamist groups seeking to infuse government with their vision of Islam have been a thorn in the state's side for decades. Some of the world's most radical militants are Egyptian, including al Qaeda leader Ayman al-Zawahri.
Since Mursi was removed from power, the state has faced the worst wave of militant violence since the 1990s.
Several hundred policemen and soldiers have been killed in attacks that spiralled last year after the government killed hundreds of Mursi's supporters in a crackdown. Sisi said two plots to assassinate him had been uncovered.
Sisi has lamented interpretations of Islam that fail to keep up with the times: "We have frozen this. It has been hundreds of years," he said in the interview broadcast on May 5.
In a meeting with tourism executives in late April, Sisi addressed the question of how "religious discourse" had damaged the tourism industry - an engine of the economy repeatedly hit by Islamist attacks over the years.
Sisi said the sector had suffered from a religious discourse "not linked to concepts and developments of the age".
"There must be an enlightened religious discourse to protect society from alien ideas," he said, according to a statement posted on the official Facebook page of his campaign.
He has also said that places of worship should play a role in fixing Egypt's moral problems, and good decisions must be in harmony with both society and "God's rulings".
RAISED IN ISLAMIC CAIRO
Yasser Abdel Aziz, a columnist who has met Sisi and followed his comments on religion, describes Sisi as a typically "moderate Egyptian" Muslim, distinguishing his approach, for example, from the puritanical Wahabism of Saudi Arabia.
Sisi would "strengthen the role of religious discourse in public institutions and in public life", but would not involve religion in government, he said. "He sees Islam as a force for good and work," he said.
Sisi was raised in the historic heart of Islamic Cairo.
He recalled seeing Christians and Jews practicing their faiths unhindered and has cited influences from his childhood including Sheikh Mohamed Metwally El Shaarawy, an Islamic preacher who died in 1998.
Former grand mufti Ali Gomaa has also been cited as a source of influence for Sisi. Sisi was present at a gathering of army officers last year at which Gomaa promised a future in paradise for members of the security forces who killed militants or were killed by them, leaked footage of the meeting showed.
Like many of the top religious figures in the Egyptian state, Gomaa is an adherent of a mystical school of Islam known as Sufism whose practices have sometimes set them at odds with more puritanical Muslims, including hardline Islamist groups.
Some analysts speculate that Sisi may have a mystical side, after a recording emerged in which he talks about experiencing visions of the future. In one of his dreams, the late Sadat tells Sisi he knew he would one day become president.
In one of his first meetings after stepping down as army chief, Sisi met leaders of Egypt's Sufi orders and descendents of the Prophet Mohammad. They backed him for the presidency.
"I hope God rewards us for protecting the people and also protecting Islam," Sisi told the meeting in a recording posted on his campaign's Facebook page.
Members of the Muslim Brotherhood accuse Sisi of manipulating religion for political gain - the same charge that was made against them.
"He used it to permit bloodletting, bringing sheikhs to justify killing," said a Brotherhood member who declined to be identified for fear of arrest. "He only wants religion to be prayer and fasting."
Sisi's strong opposition to the Brotherhood has earned him the support of Egypt's biggest religious minority, the Coptic Christians. But some Egyptians fear that long-persecuted smaller minority groups such as Shi'ites, Baha'is and atheists will face more harassment as the state adopts a pious veneer.
"Sisi doesn't want to change the religious culture of society or adopt policies that bring more religious freedoms. He will exploit this culture to realise his goals," said Karim al-Deeb, 35, who describes himself as an agnostic.
While most of Egypt's Islamist groups share the Brotherhood's opposition to Sisi, he has held on to the support of the main ultraorthodox Salafist group, the Dawa Salafiya, which first backed Mursi but later supported his removal.
Dawa Salafiya, more radical than the Brotherhood in calling for an Islamic state after the 2011 uprising that brought down Mubarak, now says it sees Sisi as best qualified to lead the state. It and its political arm, the Nour Party, have been give space to continue their activities, unlike the Brotherhood.
"Sisi is personally interested in 'true Islam' and 'correct Islam' and undermining the Islamist movements," said Ashraf El-Sherif, a lecturer in political science at the American University in Cairo (AUC). "It's part of his personal mission."