CAIRO — In his purge of Egypt’s top generals, President Mohammed Morsi leaned on the support of a junior officer corps that blamed the old guard for problems within the military and for involving the armed forces too deeply in the country’s politics after the uprising that ousted Morsi’s predecessor, Hosni Mubarak.
In an interview, one ranking officer said the military had grown increasingly demoralized because of meager salaries, cronyism, shoddy equipment, a lack of promotion opportunities, and growing confusion over the role of its leaders.
Those complaints crystallized last week after gunmen killed 16 soldiers in the northern Sinai Peninsula, causing embarrassment throughout the ranks.
‘‘The military didn’t change,’’ said the officer, a unit commander who was not authorized to speak to reporters and requested anonymity. ‘‘Give me equipment to work. You can’t give me ruined cars, a hundred soldiers, and ask me to secure 30 square kilometers in the desert.’’
The changing of the guard left an uncertain landscape. The balance of power has apparently shifted to Morsi, with the powerful Supreme Council of the Armed Forces, which had been running the country since the revolution last year, unsettled but still firmly in place. On Monday, a day after the generals’ ouster, there were no signs that the military was mobilizing in protest.
That led many analysts to suspect that the president had reached an accommodation with a new generation of military leaders who were seeking to restore the armed forces’ credibility, enhance their own positions, and preserve the military’s privileged and protected place in society.
On Sunday, Morsi forcibly retired the country’s defense minister, Field Marshal Mohamed Hussein Tantawi, and the army chief of staff, Sami Hafez Enan. The heads of the air force, navy, and air defense were also forced into retirement. Since the purge, Egyptians have desperately sought clues about whether the shake-up would begin a new period of conflict between the military and Morsi, a former leader in the Muslim Brotherhood.
‘‘Changing those leaders was smart for Morsi,’’ the officer said. ‘‘He waited for the right timing, when the country had already taken steps along the right path.’’
Whether or not Morsi struck a bargain with the younger officers, he might have enhanced his credibility with political forces outside the Brotherhood who had clamored for an end to military rule. At the same time, he could gain a degree of loyalty from a cast of officers who owe their new prominence to him.
Since the uprising, the military’s status has been the subject of a tug of war between the Brotherhood, which is the country’s most powerful political party, and the armed forces, represented by Tantawi and the military council. That struggle grew more confrontational as the Brotherhood and Morsi closed in on the presidency before the elections this spring, devolving into a fight over political authority that threatened to further polarize an already divided nation.
Emad Shahin, a political science professor at the American University of Cairo, said: ‘‘The negotiation process over the last year and half was not working. It’s not producing results.’’
He said the younger generation of military leaders, recognizing that fact, may have welcomed the change in leadership. They included General Abdul-Fattah el-Sisi, whom Morsi named as Tantawi’s replacement.
‘‘I see tons of reasons why Sisi should cooperate,’’ Shahin said, including a need to rehabilitate the military’s image. ‘‘If I were in Sisi’s shoes, I would say, ‘Maybe if we remove these stubborn generals, something will happen.’ ’’
The killings of the soldiers provided another reason for the young officers to act. “This is definitely a failure of the military institution to uphold its responsibility,’’ Shahin said.
The opaque nature of Egypt’s military made it hard to determine precisely what sort of debates had taken place. Some said it was possible that a faction within the supreme council, including Sisi, was willing to settle for far less than the broad powers that Tantawi and his allies had sought for themselves.
‘‘I think there is a minimum for the military establishment,’’ said Omar Ashour, a professor at England’s University of Exeter who is currently in Cairo. ‘‘They want a veto in sensitive foreign policy issues, including on Israel and Iran — any policy that can implicate the country in a foreign confrontation. They will want to negotiate the independence of their economic empire.’’
“Sisi was inclined to accept minimum, as opposed to what Enan and the field marshal were asking for, which was more or less the power of the Algerian military, combined with the legitimacy of the Turkish military,’’ Ashour said, referring to the broad political powers seized by Algeria’s generals in the 1990s and the Turkish military’s interventions in domestic politics.
It remains to be seen whether a new formula will greatly alter the dynamic between Egypt’s military and civilian authorities.
“Is this going to be another partition of the military and civilian spheres, with a new group in charge of the military sphere?’’ asked Robert Springborg, a professor at the Naval Postgraduate School in Monterey, Calif., and an expert on the Egyptian military.
“Is the Brotherhood taking control of the military? Or is it the beginning of democratic control?’’ he said.
And although Springborg said it was still unclear whether the initiative had come from Morsi or the young officers, there had been longstanding calls for change within the military. ‘‘There was widespread disaffection on professional grounds with Tantawi and company,’’ he said. Performance was not rewarded, Springborg said, explaining that officers would be sent for training, before being sidelined. ‘‘The assumption was that the military was for show,’’ he said. ‘‘Soldiers would say: ‘They didn’t want us to do our jobs. They didn’t let us fly the planes, or drive the tanks.’ ’’
The unit commander said soldiers were poorly compensated and saddled with failing equipment. Dissatisfaction grew with the military’s leaders for staying too long.