Almost a year after toppling Egypt's elected Islamist president, the army is set to strengthen its grip on political life with the near certain election victory of retired army chief Abdel Fattah al-Sisi.
The former field marshal is expected to trounce his sole rival, leftist Hamdeen Sabbahi, in the election on Monday and Tuesday, almost 11 months after Sisi overthrew Mohamed Morsi.
He would be the fifth president from the military since officers toppled the monarchy in 1952.
The only exception was Morsi, who was elected in 2012, a year after an uprising overthrew veteran strongman Hosni Mubarak.
The 2011 uprising initially caught the army off guard, along with other state institutions.
In the end, it was the army who removed Mubarak, a former air force chief, after deciding he could no longer govern in the face of 18 days of massive protests.
Morsi sought to clip the generals' wings. He sacked the former defence minister, a Mubarak appointee who ruled in the interim following the strongman's ouster, and replaced him with Sisi, whom he thought he could trust.
But Sisi, a military intelligence chief, toppled Morsi after millions protested to demand the Islamist's resignation.
The army has since taken on an even more central than that allowed by Mubarak, who heavily relied on a coterie of palace insiders and his vast secret police apparatus.
- Army will 'restore its role' -
"The army (with Sisi's election) will restore its role in politics in Egypt," said Mustafa Kamel el-Sayyid, an analyst and political science professor at the American University of Cairo.
Signup to our newsletter and follow us on Facebook and Twitter!
"The military's role diminished in Mubarak's era and the armed forces had no role in decision making and ensuring political stability," he said, explaining that Mubarak "relied primarily on the police."
"In the last decade of his rule, his son Gamal's political ascendancy was coupled with... civilian elite around him, at the army's expense," he said.
Mubarak had reached an understanding with the military, safeguarding their economic interests--which Sisi said were about two percent of the economy--and allowing them an administrative role.
Overall policy, however, was not in their hands, said Ahmed Abd Rabbo, a political science professor at Cairo University.
"Despite that, the army continued to play the role of a balance scale," he said. "That's why no one could remove Mubarak except the army, and that situation was repeated with different conditions in Morsi's case."
The analysts say the military, taken aback by the popular uprising, made an alliance of sorts with Morsi's Muslim Brotherhood, then the largest political force in the country that won all elections it contested since 2011.
But it found an opportunity to pull the rug out from under Morsi with a large opposition movement against the divisive Islamists.
"The army thought it could reach an understanding with the Muslim Brotherhood, to have a partnership and reach an understanding on the independence and privileges of the armed forces," Sayyid said.
But Morsi soon faced a groundswell of opposition amid a foundering economy, and accusations the Islamists were monopolising power.
Sisi, little known until his appointment as defence minister, has since become a hero to the millions who protested against Morsi, and demanded he run for president.
In March, the military said it had given Sisi a green light to run, saying his candidacy was so popular it had become an "obligation."
That statement, Sayyid said, was "a mandate from the army, meaning the military guaranteed itself power by deciding who would run for president."
Sisi shortly after announced his resignation and candidacy in a televised address, dressed in his military fatigues for the last time in public.