Egyptian President Mohamed Mursi 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 defence minister for 20 years and then took charge of Egypt after the former president was toppled last year, was shown on state television saluting Mursi and smiling. Mursi then shook his hand warmly.
Sami Enan, 64, dismissed as chief of staff, was also shown receiving his medal. In Sunday's decree pushing the men into retirement, Mursi 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 Enan were consulted before Mursi'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, Mursi's Muslim Brotherhood was hounded and its members routinely jailed. Mursi 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," Mursi told Tantawi.
Tantawi responded: "Thank you, thank you so much."
Enan was shown saluting and smiling when he received his medal and also received warm words of praise from Mursi, 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 $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 Mursi 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 Mursi for a meeting. The television announcer said they discussed "general affairs".
As well as dismissing Tantawi and Enan 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, Mursi 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 February 11, 2011.