Mohamed Morsi rejected a military ultimatum to strike a deal with his opponents tonight and declared himself Egypt’s legitimate leader – despite the eruption in Cairo of deadly gun battles during rallies to shore up his teetering position.

In a televised address to the nation, the Egyptian leader vowed to defend his “constitutional legitimacy” and refused to heed the millions of protesters who have called for him to step down since Sunday.

““The price of preserving legitimacy is my life,” he said. “Legitimacy is the only guarantee to preserve the country.”

Download the new Independent Premium app Sharing the full story, not just the headlines

Mr Morsi’s defiant comments set the stage for a coming confrontation. Political opponents who have spearheaded a nationwide insurrection want him to stand aside immediately and call early presidential elections.

The military meanwhile have given him a deadline of 48 hours in which to come to terms with the opposition. At around 4pm this afternoon, that deadline will expire.

Mohamed Morsi will wake up this morning as President of the Arab Republic of Egypt. By nightfall, if the opposition have their way, he may have been toppled in a coup d'etat.

In Egypt’s capital last night there were growing signs of the tensions which some Egyptians fear may be pulling the country apart.

At Cairo University gun battles erupted during a mass rally which had been called by the Muslim Brotherhood in response to the military’s ultimatum.

Hundreds of Morsi supporters and their opponents battled for hours in the streets alongside the university. The clashes started with rock throwing and exchanges of Molotov cocktails. But as the fighting intensified, sustained bursts of pistol and automatic weapon fire could be heard echoing down the streets.

At one point a pro-Morsi supporter strode down the main road next to the university, took aim with his shotgun and fired several rounds off down the street. Shortly afterwards the opposition attackers charged them back down the main avenue, sending rounds of birdshot ricocheting into the walls and bullets fizzing overhead.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

Further north in the Kitkat neighbourhood of Cairo, local media reports said another Brotherhood rally came under attack from residents firing birdshot pellets. At least seven people were killed during the violent clashes in the capital, according to the Associated Press.

Elsewhere in Cairo and across the country there were several mass rallies which remained entirely peaceful – though activists again reported at least 25 cases of sexual assault in the centre of the capital.

Opposition protesters continued their vigil in Tahrir Square and outside Heliopolis Palace, the seat of Mr Morsi. There was also a march on Qubba Palace, the residence currently being used by the President.

In the east Cairo suburb of Nasr City, where pro-Morsi supporters have been staging a sit-in since Sunday, thousands gathered to pledge their allegiance to the Egyptian leader. Speaking to the Independent amid the rumble of drums and buoyant chanting, many seemed unperturbed about the impending threat of military intervention.

“The Egyptian army is a national army,” said one protester. “Even if all the people here die first, Mohamed Morsi will not fall. The legitimacy of the people is stronger than the power of the army.”

But others were more wary. “Mohamed Morsi is the legitimately elected President of Egypt,” said Ibrahim Youssef, 35. “If there are clashes we are ready and we will die for our cause.”

Many among the Muslim Brotherhood and its allies consider the current uprising to be a betrayal of democracy. After winning a series of elections which culminated in last year’s Presidential poll, they feel cheated and disenchanted.

Some analysts have warned of an “Algeria scenario”, with a violent Islamist backlash tearing the state apart. But according to Egypt expert Khalil al-Anani, such an eventuality is unlikely.

Whereas in Algeria the military cancelled elections because of its fears about Islamism, he said, in Egypt the generals have their sights on Morsi because of his perceived incompetence.

“The current opposition is not because he is an Islamist but because he has failed on economic issues,” he said. The army will also try to keep the Brotherhood on side, argued Dr al-Anani, making polarisation less likely.

Of far greater risk, according to Maha Azzam, a Brotherhood expert from Chatham House, is the threat of long-term radicalisation.

“Moderate Islamists felt they wanted to go down the democratic route,” she said. “Like others before them, having achieved power they were then denied power. For them this is undermining the whole idea of democracy.

“The opposition have said the results of the ballot box are not enough. Democracy is not about the ballot box.”