CAIRO (AP) -- In retaking key powers and shaking up the military brass, President Mohammed Morsi has sharply shifted Egypt's balance of power overnight and transformed his public image from a weak leader to a savvy politician.

If unchallenged, the moves could end six decades of de facto military rule in Egypt. But they also raise a new concern at home and abroad -- the concentration of power in the hands of Islamists.

With the military as the backbone of the Egyptian state for the past 60 years, the country's first civilian and freely elected president must have closely coordinated his moves with top members of the military establishment to ensure their execution, according to analysts who closely monitor Egypt's military.

That reality underlines how much care a civilian president must take if he wants to assert his authority over a military accustomed to having one of its own filling the land's highest office.

The military sent a message of reassurance Monday about Morsi's surprise decision to retire the defense minister and chief of staff and retake powers the generals grabbed from his office days before his June 30 inauguration.

A posting on a Facebook page known to be close to the generals said the changes, announced by Morsi Sunday, amounted to the "natural" handing over of leadership to a younger generation. "The armed forces is a prestigious institution with a doctrine of full discipline and commitment to legitimacy," it said.

Morsi's move has redrawn the political map of post-Hosni Mubarak Egypt, with Morsi's Muslim Brotherhood, a fundamentalist Islamist group, gaining considerable stature from a battle not many thought it could survive, let alone win.

"With the military stripped of legislative authority, and in the absence of parliament, the president holds imperial powers," Egypt's top reform leader, Nobel Peace Prize laureate Mohamed ElBaradei, wrote on his Twitter account Monday.

Morsi has been locked in a power struggle with the military since he took office. But after militants killed 16 Egyptian soldiers a week ago at a border post with Israel in Sinai -- the worst attack on troops in living memory -- he has more aggressively sought to assert his authority over the top generals.

He fired the nation's intelligence chief a few days after the Sinai attack and made two highly publicized visits to Sinai in the company of top commanders. He also chaired several meetings with the military leadership and made a point of calling himself the supreme commander of the armed forces in televised speeches while seeking to project an image of himself as the army's patron and foremost supporter.

The long-term goal of the Brotherhood is to Islamize Egypt, the most populous Arab nation. Outlawed for most of its 84 years, the group will draw much confidence from Morsi's latest victory in his power struggle with the military as it prepares for new parliamentary elections expected before the end of the year.

Morsi, a conservative Muslim, has been careful not to push that agenda since his election, worried that he could alienate secular Egyptians, women and minority Christians. However, he made it clear while campaigning ahead in May that Islamic Shariah law must be implemented in Egypt.

The Brotherhood won both parliamentary and presidential elections in the first free and fair votes in Egypt's modern history, following Mubarak's ouster in a popular uprising last year. However, the military rulers who took power from Mubarak dissolved the Brotherhood-dominated parliament in June after a court ruled that a third of its members were illegally elected.

Morsi hand-picked his first prime minister last month, a devout Muslim who denies any link to the Brotherhood. On Sunday, he named Lt. Gen. Abdel-Fattah el-Sissi, also known to be a devout Muslim, as defense minister, replacing Field Marshal Hussein Tantawi.

How he pulled off Sunday's stunning coup, is the subject of intense speculation, with all parties concerned keeping mum on the details.

Analysts say the shake-up could have been part of a "safe exit" deal negotiated by Morsi and the generals to shield them against prosecution for alleged crimes during the time they ruled the country. They cite the appointment of Tantawi, the outgoing defense minister, and Gen. Sami Annan, the ousted chief of staff, as presidential advisers as evidence to support their theory.

Three top generals retired by Morsi on Sunday -- the chiefs of the air force, air defense and the navy-- were also given senior government jobs.

Morsi may also have tapped into divisions and the generation gap within the top echelons of the military. Tantawi, for example, is 76 and was in that job for more than 20 years. His replacement, El-Sissi, is 58.

Omar Ashour, a visiting Scholar at the Brookings Doha Center who has interviewed Egypt's post-Mubarak military rulers over the past year, said the shake-up was forced by the current balance of power, which dictates coordination between a popularly elected president and a military whose mandate for ruling expired with Morsi's election.

"The issue that is significant is to have a civilian elected president overruling the military, trying to assert the civilian superiority over the military," he said. "But the military establishment has a minimum demand, and that is a veto on key policies and national security."

Morsi would be ill-advised to treat the military as a vanquished enemy after Sunday's shake-up. It would be just as unwise, however, to underestimate the powers of the presidency, which has traditionally lent strength to its occupants no matter how weak or hesitant they were when they first took office.

For Morsi to take on a military establishment that has been dominant in Egypt since army officers seized power in a 1952 coup shows how far he was willing to go to assert his authority, even with the help of some of the generals.

Still, he knew his limitations, sailing in what is in effect uncharted waters as Egypt's first civilian president. He knew these boundaries well enough not to appoint a civilian defense minister and to realize that the military will continue to play a key role in how Egypt is run.

The United States, Egypt's main foreign backer of 30 years, said it had expected the changes, and expressed a desire to see the military and the government working well together.

"We had expected President Morsi at some point to coordinate changes in the military leadership, to name a new team," U.S. Defense Department press secretary George Little said in Washington.

U.S. State Department spokeswoman Victoria Nuland added: "What's important to us is that the civilian leadership and the military keep working well together to advance the goals of the democratic transition in Egypt."

Morsi appears to have timed his moves at a time when the military was humiliated by a major security failure with the Sinai attack on Aug. 5, just days after Israel warned an assault was imminent.

The incident led to rare media criticism of the military's combat readiness -- something that had not been seen in Egypt since its disastrous 1967 defeat by Israel -- and charges that its generals were distracted by politics when they should have been paying attention to troop protection.

But the military, in the eyes of most Egyptians, remains the nation's most powerful institution, a defender of a nation that fought four wars with Israel between 1948 and 1973, and which is obsessed about foreign threats, real or imaginary, to its security.

"We are entering a new phase, where the military returns to the barracks and all authorities go to the president," said Abdullah el-Sinawi, a prominent analyst who has for years been close to the military.

"But the political role of the military will stay with us for at least 20 more years. A diminishing political role for the military is a delusion."


Associated Press correspondents Matthew Pennington and Pauline Jelinek in Washington contributed to this report.