CAIRO — Egypt’s state news media, the traditionally admiring chronicler of Egypt’s head of state, are at war with the new president.

To be sure, state broadcasters and newspapers here still appear to celebrate President Mohamed Morsi of the Muslim Brotherhood as Egypt’s first democratically elected leader. That is also the official position of Egypt’s top generals who took power at the ouster of Hosni Mubarak and now insist that Mr. Morsi’s swearing-in fulfilled their promise of a civilian democracy.

But as Mr. Morsi moved this week to challenge the generals, the state media have quickly allied with the generals, persistently undercutting the new president while still ostensibly honoring his position.

That apparently contradictory result has made it clear who still holds the real power over the Egyptian bureaucracy. On Tuesday, for example, Mr. Morsi summoned back into session the democratically elected Parliament that the generals had dissolved after a hurried court ruling. But the headline in the newspaper Al Ahram reported only the statement of the ruling generals: “The armed forces belong to the people and will remain on the side of the constitution and legitimacy.”