Working behind the scenes, members of the old establishment, some of them close to Mr. Mubarak and the country’s top generals, also helped finance, advise and organize those determined to topple the Islamist leadership, including Naguib Sawiris, a billionaire and an outspoken foe of the Brotherhood; Tahani el-Gebali, a former judge on the Supreme Constitutional Court who is close to the ruling generals; and Shawki al-Sayed, a legal adviser to Ahmed Shafik, Mr. Mubarak’s last prime minister, who lost the presidential race to Mr. Morsi.

But it is the police returning to the streets that offers the most blatant sign that the institutions once loyal to Mr. Mubarak held back while Mr. Morsi was in power. Throughout his one-year tenure, Mr. Morsi struggled to appease the police, even alienating his own supporters rather than trying to overhaul the Interior Ministry. But as crime increased and traffic clogged roads — undermining not only the quality of life, but the economy — the police refused to deploy fully.

Until now.

White-clad officers have returned to Cairo’s streets, and security forces — widely despised before and after the revolution — intervened with tear gas and shotguns against Islamists during widespread street clashes last week, leading anti-Morsi rioters to laud them as heroes. Posters have gone up around town showing a police officer surrounded by smiling children over the words “Your security is our mission, your safety our goal.”

“You had officers and individuals who were working under a specific policy that was against Islamic extremists and Islamists in general,” said Ihab Youssef, a retired police officer who runs a professional association for the security forces. “Then all of a sudden the regime flips and there is an Islamic regime ruling. They could never psychologically accept that.”

When Mr. Mubarak was removed after nearly 30 years in office in 2011, the bureaucracy he built stayed largely in place. Many business leaders, also a pillar of the old government, retained their wealth and influence.