CAIRO - Facing dire warnings from the military about the country's growing chaos, Egyptian opposition leaders on Wednesday banded together 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 over the past week.

But even as secular and Islamist groups crossed an ideological divide to find a way out of the 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.

Still, the opposition gambit 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 in Cairo came a day after Egypt's defense chief warned of "the collapse of the state" if the country's political forces did not reconcile. Gen. Abdel-Fattah el-Sissi's statement 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.

Egyptians have reacted with growing frustration to the political feuding in Cairo and the deteriorating economy. Many have warned that the standoff -- between a weak and often intractable opposition movement and the Muslim Brotherhood, which has grown increasingly paranoid -- could lead to even worse violence.

As he left for Germany, Morsi backed down from some of the emergency measures he had imposed -- measures the public had already ignored -- saying he would leave it to local authorities to set their own curfews. On Wednesday, all three cities reduced the hours of the curfew to just a few early hours.

The visit to Germany further highlighted Morsi's troubles. Scheduled to travel before the protests started, the president was forced to cut the trip short and cancel a visit to France.

At several public appearances, Morsi appeared defensive while describing the situation in Egypt, 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 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.

In a sign of the ways the crisis is redrawing Egypt's political landscape, the Salafi Nour party announced it was also joining the call for the new government. The Salafis, considered the strongest political force in Egypt after the Muslim Brotherhood, have fractured politically in recent months, cracking the Islamist front that dominated the last parliamentary elections.

In announcing a tentative agreement with the secular opposition groups, the Nour party's leader, Younis Makhyoun, seemed to endorse a further erosion of the Brotherhood's political dominance, possibly with an eye toward the next elections. Among other aims, the tentative agreement called for "prohibiting the domination of a single faction over political life."