Hundreds of thousands of supporters and opponents of ousted Egyptian President Mohammed Mursi gathered in Cairo and Alexandria.

The rallies come two days after similar gatherings led to nationwide clashes that claimed more than 30 lives.

The huge crowds are likely to stay out on the streets until the early hours.

It raises the risk of further violence while a military-driven plan to resolve the political crisis remained mired in mistrust and confusion, dashing hopes of a quick fix.

Protesters opposed to Mr Mursi crammed into Cairo's Tahrir Square and at the presidential palace in a festive atmosphere.

Unlike last Friday there were no running street battles with Mr Mursi's supporters and soldiers, despite a much bigger turnout.

Those who backed Mr Mursi and his Muslim Brotherhood movement concentrated in vast numbers outside a mosque in the northeast of the city.

They also gathered outside the Republican Guard barracks where Mr Mursi was being held and three people were killed last Friday.

Mr Mursi was toppled last Wednesday in a takeover the military denied was a coup.

The army said it stepped in to enforce the will of millions of Egyptians who rallied on 30 June demanding his resignation.

But while Mr Mursi's ouster was met with scenes of jubilation, it angered Islamists who held protests on Friday in which 1,400 people were wounded in addition to those killed.

In Alexandria, where 14 people died on Friday, clashes broke out again, but there were no immediate reports of casualties.

The violence across the Arab world's most populous state saw rival factions fighting street battles in central Cairo and many others cities and towns.

The protests underlined the pressing need for a swift and inclusive political solution.

Egypt's allies in the West, including main aid donors the US and the European Union, and in Israel, with which Egypt has had a US-backed peace treaty since 1979, have looked on with increasing alarm.

Elsewhere, Social Democratic lawyer Ziaad Bahaa el-Din is likely to be appointed interim prime minister of Egypt under a deal emerging among the country's new political forces.

He also said liberal politician Mohamed ElBaradei, whose initial nomination for the post angered a key Islamist party, would probably be appointed interim deputy president instead.