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.”

The only front-page article to focus on Mr. Mori’s decision to recall the Parliament blamed it for causing the Egyptian stock market to tank. A front-page photograph depicted the president shoulder to shoulder — and notably shorter — next to the top military officer, Field Marshal Mohamed Hussein Tantawi.

While private news channels interviewed defiant lawmakers leaving the Parliament, the main state network switched to documentaries, including an anniversary tribute to Egypt’s secret police.

The state media campaign against Mr. Morsi is part of a bewildering power struggle in the streets, the courts and back rooms that has all but paralyzed Egypt’s government. With its economy sputtering and its currency at risk of collapse, Egypt badly needs a stable government that can make credible commitments to the lenders, beginning with the International Monetary Fund. But in the continuing standoff between Mr. Morsi and the generals, almost no one can say for sure who is in charge.

“It is like a psychological war in our midst, and no knows what is going on,” said Mohamed Salem, 26, selling cigarettes in the street because he could not find a job.

The military council had seemed to be “out of the game” but still seized Parliament, Mr. Salem continued, growing agitated. And then Mr. Morsi had taken his oath before the constitutional court but immediately defied its authority. “Who can understand this?” he complained.

The war within the Egyptian state media offensive against the president has extended to coverage of a planned visit by Secretary of State Hillary Rodham Clinton this weekend as well. Al Ahram has emphasized all week that Washington is divided and wary about the first president from the Muslim Brotherhood, an Islamist group long critical of Israel and the West.

But the front page of its English-language weekly took an opposite tack to undercut the president by portraying him as the pawn of Washington. Although wildly counterintuitive, that conspiracy theory has tapped into the deep popular distrust here of the United States.

Mr. Morsi’s decree restoring Parliament “was intended to send a message to the military and other authorities, warning them that the Americans want him to assume full powers and that they are ready to protect him to achieve this objective,” Al Ahram Weekly quoted Diaa Rashwan of Al Ahram Center for Political and Strategic Studies as saying. The report noted that Mr. Morsi issued the order not long after meeting with Deputy Secretary of State William J. Burns.

The paper even quoted a former leftist presidential candidate, Abul-Ezz El-Hariri, suggesting that the United States hoped to use the establishment of a religious state as a pretext for invasion. Emad Shahin, a political scientist at the American University in Cairo, said the state media’s attacks on the head of state made the situation perfectly clear: Mr. Morsi represented a double threat as the first civilian and the first Islamist to hold the presidency.

“This is a deliberate and well-orchestrated campaign to shake Morsi’s image, ensure his failure and frustrate the revolution,” Mr. Shahin said.

Ahmed Abu Baraka, a lawyer for the Muslim Brotherhood, said the issue was deeper than bias. “It is an incurable disease in state media that needs surgery,” he said, blaming 60 years of parroting the ideology of secular dictatorship.

Taghrid Wafi, a state television producer, said she and her colleagues were in “confusion.”

“They don’t know who is in charge,” she said, noting that in some ways the military’s grip on the news media had loosened since Mr. Morsi’s election. For the first time, she said, she could interview activists who criticized the military for court-martialing civilians. “You know we don’t work on our own; we need approval for our guests.”

“I think this is like the time right after the revolution, when nobody understood anything and we could present whatever we wanted,” she said. “But when the military took hold of the building, it became forbidden to mention the military. If you did something like that you’d be called ‘an agenda with ulterior motives.’ ”

But she also acknowledged that she and many of her colleagues distrust Mr. Morsi’s background in the Muslim Brotherhood, saying, “Maybe in the future a person who says something about the Brothers could be accused of an ‘agenda’ as well!”

Others in the state media stuck to the generals’ line that Mr. Morsi was the new boss. “The president is elected by the public, and he is naturally the person with the power,” said Osama Abdel Aziz, a managing editor at Al Ahram, though he acknowledged that Mr. Morsi “didn’t receive all of his powers” because of the military’s recent decree taking over lawmaking and budgetary authority.

He insisted that Al Ahram was no longer “the newspaper with one reader” — that was President Mubarak — but now sent its reporters out to truly cover the news. On Wednesday, he promised that Thursday’s front page would feature the photograph of an 84-year-old man who had brought a complaint to President Morsi’s new grievance office — a demonstration of the paper’s new empathy for the common man and fairness to President Morsi.

But the picture did not appear; the headline featured a misleading quotation from Mr. Morsi suggesting he had backed down before a new court order again dissolving Parliament.

“The media looks to the center of power,” said Hala Mustafa, editor of the state-financed journal Democracy. “I think everybody knows that the military council represents the center of power, the real comprehensive authority in the country.”