CAIRO (AFP) - President Mohammed Mursi refused to quit hours before an army ultimatum expires on Wednesday as deadly violence rocked Cairo during mass protests demanding he resign, in Egypt's worst crisis since its 2011 revolution.
In a televised address early on Wednesday, the embattled Islamist leader said he had been freely elected to lead the troubled nation little more than a year ago and intended to stick to his task.
The only alternative to respecting the constitutional legitimacy of the office was further bloodshed on the streets, he warned, adding that he stood ready to "give my life" to defend constitutional legitimacy.
Only hours after Mr Mursi's speech, the health ministry reported that unidentified gunmen had killed 16 people and wounded about 200 more after opening fire on a rally by his supporters in Cairo.
With a showdown looming between Mr Mursi and the army, Egypt's military chiefs said on Wednesday they were ready to die to defend the people of Egypt.
"The general commander of the armed forces said it was more honourable for us to die than to have the people of Egypt terrorised or threatened," said a statement called "The Final Hours" posted on a page associated with the army.
"We swear to God that we will sacrifice our blood for Egypt and its people against all terrorists, extremists and ignorant" groups, it said, citing army chief Abdel Fattah al-Sisi.
Mr Mursi's defiant speech came as the clock ticked down on a deadline set by the powerful military for him to meet the "people's demands" by 4:30 pm (1430 GMT) on Wednesday or have a solution imposed on him.
While he made no direct reference to the ultimatum in his speech, a message posted on his official Twitter account called on the army to back off.
"President Mursi insists on (his) constitutional legitimacy and rejects any attempt to overstep it," the message said.
"(He) calls on the armed forces to withdraw their warning and rejects any dictates, domestic or foreign." But Egypt's state-owned and independent press predicted that Wednesday would be the day of Mr Mursi's departure.
"Today: Ouster or Resignation," read the front-page headline of the state-owned mass circulation daily Al-Ahram. "The End," declared the independent daily Al-Watan.
Cairo's streets were again unusually quiet on Wednesday, with many choosing to stay home over fears of more violence.
The army's 48-hour ultimatum drew a rapturous welcome from opponents of Morsi when it was delivered on Monday.
But his supporters accused the generals of preparing a return to the unpopular military rule of the months between the overthrow of former president Hosni Mubarak in February 2011 and Morsi's swearing-in on June 30 last year.
Morsi's opponents accuse him of having betrayed the revolution by concentrating power in Islamist hands and of sending the economy into freefall.
His supporters say he inherited many problems from a corrupt regime, and that he should be allowed to complete his term, which runs until 2016.