Egyptian President Mohamed Morsy was on Tuesday shown awarding medals to Field Marshal Hussein Tantawi and another senior general who he pushed into retirement this week, a move that stamped his authority over the once ruling military.
Tantawi, 76, who served as Hosni Mubarak's defense minister for 20 years and then took charge of Egypt after the former president was toppled last year, was shown on state television saluting Morsy and smiling. Morsy then shook his hand warmly.
Sami Anan, 64, dismissed as chief of staff, was also shown receiving his medal. In Sunday's decree pushing the men into retirement, Morsy had announced the medal awards. He had praised the work of the army in a speech shortly after that.
The decision to send the generals into retirement prompted some speculation about a showdown with the generals and one report, that was denied, that they were under house arrest.
Both the army and the presidency said Tantawi and Anan were consulted before Morsy's decree. A Facebook page affiliated to the military council carried a statement saying the shift in command was a "natural change in the leadership of the armed forces, transferring responsibility to a new generation".
The scene of ex-generals receiving medals from an Islamist president was unimaginable before the uprising against Mubarak erupted in January 2011.
Under Mubarak and his presidential predecessors, who all hailed from the military, Morsy's Muslim Brotherhood was hounded and its members routinely jailed. Morsy himself had spent time in jail.
"Due to your loyalty and love for the nation, this is the appreciation from the Egyptian people and not from their president, to a man who has been loyal to his people and country. God give you success," Morsy told Tantawi.
Tantawi responded: "Thank you, thank you so much."
Anan was shown saluting and smiling when he received his medal and also received warm words of praise from Morsy, who took office in June.
The former chief of staff was long seen as particularly close to the Pentagon, the main sponsor of Egypt's armed forces. Washington gives Egypt US$1.3 billion in military aid each year.
The United States, wary of Islamists, opened formal contacts with the Muslim Brotherhood in 2011, as the group proved an increasingly important political player. U.S. Secretary of State Hillary Clinton met Morsy in Cairo in July.
"When the secretary was in Egypt we knew that there would be a change at an appropriate moment and that it would be discussed between the civilian leadership and the military," State Department spokeswoman Victoria Nuland said on Monday.
"What is 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," she said.
She added that Washington had worked with many of the new army appointees and many had been trained in the United States.
After receiving their medals, the two outgoing generals, who were appointed advisors to the president in his decree, were shown sitting down with Morsy for a meeting. The television announcer said they discussed "general affairs."
As well as dismissing Tantawi and Anan from their posts, the head of the navy and other generals were removed and younger officers moved in to replace them.
In addition to making changes at the top of the military, Morsy tore up a decree issued by the then-ruling council as he was being elected in June which had put curbs on his powers.
The decision to cancel the army's constitutional decree is now being challenged in an administrative court.
The courts have proved a battleground for opposing camps throughout Egypt's rocky transition to democracy since Mubarak was toppled on 11 February, 2011.