CAIRO — President Mohammed Morsi forced the retirement on Sunday of his powerful defense minister, the army chief of staff, and several senior generals in a stunning purge that seemed for the moment to reclaim for civilian leaders much of the political power the Egyptian military had seized since the fall of Hosni Mubarak last year.
Morsi also nullified a constitutional declaration, issued by the military before he was elected, that eviscerated the powers of the presidency and arrogated to the military the right to pass laws. It was not immediately clear whether he had the constitutional authority to cancel that decree.
In a news conference broadcast at about 5 p.m., Morsi’s spokesman, Yasser Ali, announced the retirements of the defense minister, Field Marshal Mohamed Hussein Tantawi, and the chief of staff, Sami Anan. He said that both men would serve as advisers to the president, suggesting that they had acquiesced to the plan.
Morsi also named a senior judge, Mahmoud Mekki, as his vice president. During the Mubarak era, Mekki fought for judicial independence and spoke out frequently against voting fraud. The president also replaced the commanders of the navy, air force, and air defense.
With Sunday’s moves, Morsi restored to his office the powers taken from him, seizing back sole control of the constitution-drafting process and the right to issue laws.
He decided that if the 100-member panel drafting the document did not finish its work for whatever reason, he will appoint a new one within 15 days and give it three weeks to finish its work. The draft will then be put to a vote in a national referendum within 30 days. Parliamentary elections will follow if the draft is adopted.
‘‘There was a duality of power,’’ said Saad Emara, a senior Muslim Brotherhood member. ‘‘This had to be settled in favor of one authority. The boat with two captains sinks.’’
A few hours after the decisions were announced, Morsi called on Egyptians to rally behind him in the face of the nation’s many challenges.
‘‘Today’s decisions are not directed at certain persons or meant to embarrass certain institutions. . . . I only had in mind the interest of this nation and its people,’’ he said in a televised speech. ‘‘I want [the armed forces] to dedicate themselves to a mission that is holy to all of us and that is the defense of the nation.’’
After nightfall, thousands of jubilant Morsi supporters celebrated in Tahrir Square, birthplace of the uprising that ousted Hosni Mubarak 18 months ago. Another crowd of supporters formed outside the presidential palace in Cairo’s suburb of Heliopolis.
Tantawi, 75, had been expected to retire in the near future, but no timetable had been set, at least not publicly. Ali, praising Tantawi’s ‘‘invaluable services to the homeland,’’ said that the current chief of military intelligence, Abdul Fattah el-Sisi, would become the country’s new defense minister.
There was no immediate reaction from the military, which traditionally sees itself as the guardian of the Egyptian state and is a fierce defender of its own powers and prerogatives. It remained to be seen whether the shake-up was the result of an understanding between Morsi and his senior generals or an unexpected attack that could draw a sharp response.
But a member of the military council, General Mohammed el-Assar, told Reuters that the decision was, ‘‘based on consultation with the field marshal and the rest of the military council.’’ On Sunday, el-Assar was appointed deputy defense minister.
In Washington, officials have closely watched the confrontation between Morsi’s civilian government and the military leaders, and recently welcomed signs that negotiations over how to share power were underway behind closed doors. Although neither the White House nor the State Department offered any immediate reaction to Morsi’s actions on Sunday, both Secretary of State Hillary Rodham Clinton and Defense Secretary Leon E. Panetta met with Field Marshal Tantawi and Morsi last month.
The changes were part of the continuing fallout from the killings of 16 Egyptian soldiers one week ago in the Sinai Peninsula. In the aftermath of the attack, which exposed intelligence failures by the government, Morsi fired his intelligence chief and replaced several other top security officials.