CAIRO — Egyptian opposition leaders, facing dire warnings from the military about the country’s growing chaos, banded together Wednesday for the first time and pressed President Mohammed Morsi to form a national unity government as a way to halt the violence that has led to dozens of deaths in the past week.
But even as secular and Islamist groups crossed an ideological divide to try to find a way out of the spiraling violence, Morsi rejected the idea during a visit to Germany, where he said a new government would only be formed after parliamentary elections in April.
‘‘In Egypt there is a stable government working day and night in the interest of all Egyptians,’’ Morsi said after meeting with Chancellor Angela Merkel in Berlin.
Still, the gambit by the opposition offered the first indication that political forces were searching for common ground and a way out of the chaos.
Egypt’s largest secular-leaning opposition block, the National Salvation Front, joined a hard-line Islamist group, the Nour party, which had been allied with the president and his movement, the Muslim Brotherhood, in calling for a new government.
The political maneuvers came a day after Egypt’s defense chief warned of ‘‘the collapse of the state’’ if the country’s quarreling political forces did not reconcile. The statement, by General Abdul Fattah al-Sisi, who is also the army chief of staff and minister of defense, was a stark reminder of Morsi’s weakened authority after days of protests led him to declare a state of emergency in three cities along the Suez Canal when the police lost control.
Egyptians have reacted with growing frustration to the political feuding in Cairo and the deteriorating economy. Many have warned that the ongoing standoff — between a weak and often-intractable opposition movement and the Muslim Brotherhood — could devolve into even worse political violence.
As he left for Germany, Morsi abruptly backed down from some of the emergency measures he had imposed — measures the public had already ignored — saying that he would leave it to the local authorities of the troubled provinces to set their own curfews. On Wednesday, all three cities sharply reduced the hours of the curfew.
The visit to Germany further highlighted Morsi’s troubles. Scheduled before the protests started, the president was forced to cut the trip short and cancel a planned visit to France.
At several public appearances, Morsi appeared defensive while describing the situation, blaming much of the violence on remnants of Egypt’s deposed government, including a little known group that the Egyptian authorities have appeared to scapegoat in recent days as a grave national security threat.
On Tuesday, Egypt’s public prosecutor declared the group, which calls itself the Black Bloc, a terrorist organization and issued warrants for the arrest of its members. Five people were arrested Wednesday, state news media reported.