Field Marshal Abdel Fattah al-Sisi resigned as Egypt's defence minister the day after announcing he will stand for president, a post for which he has no serious competition.
Sisi turned up in civilian clothes at the weekly cabinet meeting to submit his resignation after quitting as army chief the previous night, state news agency MENA reported.
General Sedki Sobhi was sworn in as the new defence minister and army chief, and Lieutenant General Mahmoud Hegazy replaced Sobhi as army chief of staff, the presidency said. Hegazy is the father-in-law of Sisi's son.
Declaring his widely anticipated candidacy in a televised address on Wednesday, Sisi vowed to fight "terrorism" and work towards restoring the battered economy.
The wildly popular Sisi faces no serious competition in the election to be held before June, and is widely seen as the only leader able to restore order after more than three years of turmoil since the Arab Spring overthrow of veteran strongman Hosni Mubarak.
"With all modesty, I nominate myself for the presidency of Egypt," Sisi said in the address, wearing his uniform.
He vowed to fight militancy which has killed more than 200 policemen and troops since the military ousted elected president Mohamed Morsi last July.
US deputy State Department spokeswoman Marie Harf said Washington was not backing any candidate in the election, saying it was up to the Egyptian people to decide.
But it was "critical that they are able to do so in an environment that allows the free expression of political views without intimidation or fear of retribution", Harf told AFP.
Washington has been critical of Egypt's military-installed government for the slow transition to democracy since Morsi's ouster.
But the Egyptian cabinet reiterated that it aims to "build a modern state based on democratic institutions".
Government spokesman Hany Salah told reporters the cabinet praised "the patriotic and fundamental role played by Sisi in the success of the June revolution", referring to Morsi's ouster after mass protests against the Islamist's one-year rule.
A separate cabinet statement praised Sisi for "facing the forces of terrorism and destruction with full force and vigour".
State television broadcast footage of Sisi meeting his election campaign team.
Egyptian media hailed Sisi's speech on Wednesday, splashing it across their front pages.
The announcement was also welcomed on the street, with people saying Sisi becoming president was inevitable.
Signup to our newsletter and follow us on Facebook and Twitter!
"Sisi is too powerful. If he had remained as defence minister, he would have become a headache for any president. Therefore there is no alternative to him" but to become president, said tour operator Ali Amin.
Sisi's candidacy is likely to further inflame Islamist protests and worry secular activists who fear a return to rule by the military and the strong-arm tactics of the Mubarak era.
Morsi's Muslim Brotherhood rejected Sisi's candidacy outright.
"He led a coup to become president. He is a man who has killed daily since the coup," Ibrahim Munir of the Brotherhood's political bureau told AFP by telephone from London.
- Real power behind Mansour -
Sisi is believed to be the real power behind interim president Adly Mansour, under whose watch police have killed hundreds of Islamist protesters and detained about 15,000 suspects since Morsi's ouster.
The crackdown has worried the international community, which was outraged after 529 Morsi supporters were sentenced to death this week over deadly riots.
Many Egyptians, deeply disillusioned by Morsi's sole year in office, have supported the crackdown in the hope of seeing stability restored.
For those who want an end to the violence that has scared off investors and tourists, Sisi's military background is an asset.
The army is seen as the country's most stable institution, and Sisi can count on further aid from friendly Gulf states that have pumped billions of dollars into Egypt since Morsi's ouster.
Analysts say Sisi will face stiff challenges.
"To turn the economy around, deep and painful restructuring is needed, something the military-backed government has avoided so far," said James Dorsey, Middle East Expert at Singapore-based S. Rajaratnam School of International Studies.
"He will lead a deeply divided country in which a significant minority feels disenfranchised. He would need to build bridges to prevent further polarisation and violence."
In a fresh sign of the internal tensions, an Al-Qaeda-inspired group based in the Egyptian Sinai threatened Thursday to attack contractors and workers involved in the construction of a security wall at a town in the restive peninsula.
The Ansar Beit al-Maqdis (Partisans of Jerusalem) group has claimed most of the deadliest attacks in Egypt since the military ousted Islamist president Mohamed Morsi in July, saying they were in revenge for a crackdown on his supporters.