CAIRO - With a military deadline for a resolution to Egypt's political crisis looming, the country braced for a showdown Wednesday after embattled President Mohammed Morsi insisted he will not step down in the face of demands by millions of protesters, vowing to protect his "constitutional legitimacy" with his life.

On the streets, the sense that both sides are ready to fight to the end sharpened, with overnight clashes between supporters of the Islamist president and opponents that left at least 23 dead, most of them in a single incident of fighting outside Cairo University.

The violence came just hours before a deadline set by the military was to expire Wednesday for Morsi to find a solution with the opposition or the army would impose its own political plan. The draft would see the military suspend the constitution, disband parliament and install a new leadership.

With his political fate hanging in the balance, Morsi demanded in a speech late Tuesday that the powerful armed forces withdraw their ultimatum, saying he rejected all "dictates" — from home or abroad.

In an emotional address aired live to the nation, the Islamist leader who a year ago was inaugurated as Egypt's first freely elected president accused loyalists of his ousted autocratic predecessor Hosni Mubarak of exploiting the wave of protests to topple his regime and thwart democracy.

"There is no substitute for legitimacy," said Morsi, at times angrily raising his voice, thrusting his fist in the air and pounding the podium. He warned that electoral and constitutional legitimacy "is the only guarantee against violence."

The statement showed that Morsi and his Muslim Brotherhood are prepared to run the risk of challenging the army. It also entrenches the lines of confrontation between his Islamist supporters and Egyptians angry over what they see as his efforts to impose control through the Brotherhood and his failures to deal with the country's multiple problems.

As anti- and pro-Morsi supporters geared up for the fourth consecutive day of mass rallies Wednesday, it was clear that Egypt's crisis has become a struggle over whether a popular uprising can overturn the verdict of the ballot box.

Morsi's opponents say he has lost his legitimacy through mistakes and power grabs and that their turnout on the streets over the past three days shows the nation has turned against him.

On Tuesday, millions of jubilant, chanting Morsi opponents again filled Cairo's historic Tahrir Square, as well as avenues adjacent to two presidential palaces in the capital, and main squares in cities nationwide. After Morsi's speech, they erupted in indignation, banging metal fences to raise a din, some raising their shoes in the air in a show of contempt. "Leave, leave," they chanted.

The president's supporters also moved out in increased marches in Cairo and other cities, and stepped up warnings that it will take bloodshed to dislodge him. While Morsi has stuck to a stance that he is defending democracy in Egypt, many of his Islamist backers have presented the fight as one to protect Islam.

Political violence was more widespread on Tuesday, with multiple clashes between the two camps in Cairo as well as in the Mediterranean city of Alexandria and other cities. A march by Morsi supporters outside Cairo University came under fire from gunmen on nearby rooftops.

At least 23 people were killed in Cairo and more than 200 injured, according to hospital and security officials who spoke on condition of anonymity because they were not authorized to talk to the media. Most of the killings took place outside Cairo University in Cairo's twin city of Giza.

The latest deaths take to at least 39 the people who have died since the first day of protests, Sunday.

On Monday, the military gave Morsi an ultimatum to meet the protesters' demands within 48 hours. If not, the generals' plan would suspend the Islamist-backed constitution, dissolve the Islamist-dominated legislature and set up an interim administration headed by the country's chief justice, the state news agency reported.

The leaking of the military's so-called political "road map" appeared aimed at adding pressure on Morsi by showing the public and the international community that the military has a plan that does not involve a coup.

On his official Twitter account, Morsi urged the armed forces "to withdraw their ultimatum" and said he rejects any domestic or foreign dictates."

In the 46-minute speech Tuesday, he implicitly warned the military against removing him, saying such action will "backfire on its perpetrators."

Fearing that Washington's most important Arab ally would descend into chaos, U.S. officials said they are urging Morsi to take immediate steps to address opposition grievances, telling the protesters to remain peaceful and reminding the army that a coup could have consequences for the massive American military aid package it receives. The officials spoke on condition of anonymity because they were not authorized to speak publicly.

Morsi's adviser Ayman Ali denied that the U.S. asked Egypt to call early presidential elections and said consultations were continuing to reach national conciliation and resolve the crisis. He did not elaborate.

The army has insisted it has no intention to take power. But the reported road map showed it was ready to replace Morsi and make a sweeping change in the ramshackle political structure that has evolved since Mubarak's fall in February 2011.

The constitution and domination of the legislature after elections held in late 2011-early 2012 are two of the Islamists' and Brotherhood's most valued victories — along with Morsi's election last year.

At least one anti-Morsi TV station put up a clock counting down to the end of the military's ultimatum, putting it at 4 p.m. Wednesday (1400 GMT, 10 a.m. EDT), though a countdown clock posted online by Morsi opponents put the deadline at 5 p.m. (1500 GMT, 11 a.m. EDT). The military did not give a precise hour.

Morsi also faced new fissures within his leadership.

Three government spokesmen — two for Morsi and one for the prime minister — quit on Tuesday as part of high-level defections that underscored Morsi's increasing isolation and fallout from the military's ultimatum. Five Cabinet ministers, including the foreign minister, resigned Monday, and a sixth, Sports Minister El-Amry Farouq, also quit Tuesday.

One ultraconservative Salafi party, al-Nour, also announced its backing for early elections. The party was once an ally of Morsi but in recent months has broken with him.

In a significant move, opposition parties and the youth movement behind the demonstrations agreed that reform leader and Nobel Peace laureate Mohamed ElBaradei would represent them in any negotiations on the country's political future. The move appeared aimed at presenting a unified voice in a post-Morsi system, given the widespread criticism that the opposition has been too fragmented to present an alternative to the Islamists.

Loading Slideshow...
  • An opponent of Egypt's Islamist President Mohammed Morsi shouts slogans during a protest in Tahrir Square in Cairo, Egypt, Wednesday, July 3, 2013. A Defense Ministry official said army chief Gen. Abdel-Fattah el-Sissi is meeting with his top commanders, hours before the military's deadline to the president and opposition to resolve the nation's political crisis is set to expire. Arabic read " leave." (AP Photo/Amr Nabil)

  • Opponents of Egypt's Islamist President Mohammed Morsi slaughter lambs as symbols of Morsi and Muslim Brotherhood leaders during a protest in Tahrir Square in Cairo, Egypt, Wednesday, July 3, 2013. (AP Photo/Amr Nabil)

  • Opponents of Egypt's Islamist President Mohammed Morsi hold Arabic signs reading "leave," as fire rages at the Muslim Brotherhood headquarters in Alexandria, Friday, June 28, 2013. (AP Photo/Heba Khamis)

  • An opponent of Egypt's Islamist President Mohammed Morsi chants slogans during a protest outside the presidential palace, in Cairo, Egypt, Wednesday, July 3, 2013. The deadline on the military's ultimatum to President Mohammed Morsi has expired, with 48 hours passing since the time it was issued. Giant cheering crowds of Morsi's opponents have been gathered in Cairo's Tahrir Square and other locations nationwide, waving flags furiously in expection that the military will act to remove the Islamist president after the deadline ends. (AP Photo/Khalil Hamra)

  • An opponent of Egypt's Islamist President Mohammed Morsi chants slogans during a protest outside the presidential palace, in Cairo, Egypt, Wednesday, July 3, 2013. The deadline on the military's ultimatum to President Mohammed Morsi has expired, with 48 hours passing since the time it was issued. Giant cheering crowds of Morsi's opponents have been gathered in Cairo's Tahrir Square and other locations nationwide, waving flags furiously in expection that the military will act to remove the Islamist president after the deadline ends. (AP Photo/Khalil Hamra)

  • Egyptian protesters calling for the ouster of President Mohamed Morsi react as they watch his speech on a screen in a street leading to presidential palace early in Cairo on July 3, 2013. Morsi told Egyptians that he had been freely elected little more than a year ago and that he intended to continue to carry out his duties despite mass protests demanding his resignation. (MAHMUD KHALED/AFP/Getty Images)

  • Hundreds of Egyptian protesters begin to gather in Tahrir Square as the deadline given by the military to Egyptian President Mohammed Morsi approaches on July 3, 2013 in Cairo, Egypt. The president gave a defiant speech last night and vowed to stay in power despite the military threats. As unrest spreads throughout the country, at least 23 people were killed in Cairo on Tuesday and over 200 others were injured. (Photo by Spencer Platt/Getty Images)

  • Holding a picture of the second President of Egypt Gamal Abdel Nasser Hussein, hundreds of Egyptian protesters begin to gather in Tahrir Square as the deadline given by the military to Egyptian President Mohammed Morsi approaches on July 3, 2013 in Cairo, Egypt. The president gave a defiant speech last night and vowed to stay in power despite the military threats. As unrest spreads throughout the country, at least 23 people were killed in Cairo on Tuesday and over 200 others were injured. (Photo by Spencer Platt/Getty Images)

  • Thousands of Egyptian protesters begin to gather in Tahrir Square as the deadline given by the military to Egyptian President Mohammed Morsi approaches on July 3, 2013 in Cairo, Egypt. The president gave a defiant speech last night and vowed to stay in power despite the military threats. As unrest spreads throughout the country, at least 23 people were killed in Cairo on Tuesday and over 200 others were injured. It has been reported that the military has taken over state television. (Photo by Spencer Platt/Getty Images)

  • Thousands of Egyptian protesters begin to gather in Tahrir Square as the deadline given by the military to Egyptian President Mohammed Morsi approaches on July 3, 2013 in Cairo, Egypt. The president gave a defiant speech last night and vowed to stay in power despite the military threats. As unrest spreads throughout the country, at least 23 people were killed in Cairo on Tuesday and over 200 others were injured. It has been reported that the military has taken over state television. (Photo by Spencer Platt/Getty Images)

  • Thousands of Egyptian protesters begin to gather in Tahrir Square as the deadline given by the military to Egyptian President Mohammed Morsi approaches on July 3, 2013 in Cairo, Egypt. The president gave a defiant speech last night and vowed to stay in power despite the military threats. As unrest spreads throughout the country, at least 23 people were killed in Cairo on Tuesday and over 200 others were injured. It has been reported that the military has taken over state television. (Photo by Spencer Platt/Getty Images)

  • Egyptian protesters calling for the ouster of President Mohamed Morsi gather in Cairo's landmark Tahrir Square on July 2, 2013 as laser lights (L) directed at the government building spell 'Game Over.' (KHALED DESOUKI/AFP/Getty Images)

  • Opposition protesters shout slogans as they gather in thousands at qoubba Presidential Palace to protest against Egyptian President Mohammed Morsi and the Muslim Brotherhood on July 2, 2013 in Cairo. Egypt's political crisis deepened as Islamist President Mohamed Morsi snubbed an army ultimatum threatening to intervene if he did not meet the demands of the people, and five ministers led a spate of government resignations. (GIANLUIGI GUERCIA/AFP/Getty Images)

  • Egyptian supporters of President Mohamed Morsi gather in Rabaa el-Aadawia district of cairo on July 2, 2013, as opponents of Egypt's president also poured onto the streets of Cairo to press their demand that he step down after the Islamist president snubbed an ultimatum from the army to agree to the 'people's demands' or face an imposed solution. (KHALED KAMEL/AFP/Getty Images)

  • Egyptian opposition protester shout slogans as tens of thousands gather outside the Presidential Palace calling for the ouster of Egyptian President Mohammed Morsi on July 2, 2013 in Cairo. Opponents of Egypt's Mohamed Morsi poured onto the streets of Cairo to press their demand that he step down after the Islamist president snubbed an ultimatum from the army to agree to the 'people's demands' or face an imposed solution. (GIANLUIGI GUERCIA/AFP/Getty Images)

  • Egyptian protesters calling for the ouster of President Mohamed Morsi gather in Cairo's landmark Tahrir Square on July 2, 2013. Opponents of Egypt's Mohamed Morsi poured onto the streets of Cairo to press their demand that he step down after the Islamist president snubbed an ultimatum from the army to agree to the 'people's demands' or face an imposed solution. (KHALED DESOUKI/AFP/Getty Images)

  • An Egyptian opposition protester holds up the head of a sheep as tens of thousands gather outside the Presidential Palace calling for the ouster of Egyptian President Mohammed Morsi on July 2, 2013 in Cairo. Opponents of Egypt's Mohamed Morsi poured onto the streets of Cairo to press their demand that he step down after the Islamist president snubbed an ultimatum from the army to agree to the 'people's demands' or face an imposed solution. (GIANLUIGI GUERCIA/AFP/Getty Images)

  • An Egyptian youth with his face painted in the colours of the national flag look over as opponents of Egyptian President Mohamed Morsi protest calling for his ouster at Cairo's landmark Tahrir Square, on July 2, 2013. Egypt's political crisis deepened as Islamist President Mohamed Morsi snubbed an army ultimatum threatening to intervene if he did not meet the demands of the people, and five ministers led a spate of government resignations. (KHALED DESOUKI/AFP/Getty Images)

  • An Egyptian opposition demonstrator sits at the top of a column watching a military helicopter fly by, as protesters (unseen) call for the ouster of President Mohamed Morsi outside the presidential palace in Cairo, on July 2, 2013. Egypt's political crisis deepened as Islamist President Morsi snubbed an army ultimatum threatening to intervene if he did not meet the demands of the people, and five ministers led a spate of government resignations. (MAHMUD KHALED/AFP/Getty Images)

  • An Egyptian boy waves a national flag during a protest against Islamist President Mohammed Morsi in Tahrir Square in Cairo, Egypt, Tuesday, July 2, 2013. With a military deadline for intervention ticking down, protesters seeking the ouster of Egypt's Islamist president sought Tuesday to push the embattled leader further toward the edge with another massive display of people power. (AP Photo/Amr Nabil)

  • Opponent of Egypt's Islamist President Mohammed Morsi hold a large Egyptian national flag during a protest outside the presidential palace, in Cairo, Egypt, Tuesday, July 2, 2013. Egypt was on edge Tuesday following a "last-chance" ultimatum the military issued to Mohammed Morsi, giving the president and the opposition 48 hours to resolve the crisis in the country or have the army step in with its own plan. (AP Photo/Hassan Ammar)

  • Opponents of Egypt's Islamist President Mohammed Morsi wave national flags during a protest outside the presidential palace, in Cairo, Egypt, Tuesday, July 2, 2013. Egypt was on edge Tuesday following a "last-chance" ultimatum the military issued to Mohammed Morsi, giving the president and the opposition 48 hours to resolve the crisis in the country or have the army step in with its own plan. (AP Photo/Khalil Hamra)

  • An Egyptian protester waves a national flag on a roof in Tahrir Square during a demonstration against Egypt's Islamist President Mohammed Morsi in Cairo, Monday, July 1, 2013. Egypt's powerful military warned on Monday it will intervene if the Islamist president doesn't "meet the people's demands," giving him and his opponents two days to reach an agreement in what it called a last chance. Hundreds of thousands of protesters massed for a second day calling on Mohammed Morsi to step down. (AP Photo/ Manu Brabo)

  • An Egyptian protester waves a national flag in Tahrir Square during a demonstration against Egypt's Islamist President Mohammed Morsi in Cairo, Monday, July 1, 2013. Egypt's powerful military warned on Monday it will intervene if the Islamist president doesn't "meet the people's demands," giving him and his opponents two days to reach an agreement in what it called a last chance. Hundreds of thousands of protesters massed for a second day calling on Mohammed Morsi to step down. (AP Photo/ Manu Brabo)

  • An Egyptian opposition demonstrator, runs down the length of a long national flag being held by protesters calling for the ouster of President Mohamed Morsi, outside the presidential palace in Cairo, on July 2, 2013. (MAHMUD KHALED/AFP/Getty Images)

  • An Egyptian protester shouts slogans during a demonstration against Egypt's Islamist President Mohammed Morsi in Tahrir Square in Cairo Monday, July 1, 2013. (AP Photo/Amr Nabil)

  • Opponents of Islamist President Mohammed Morsi waves Egyptian national flags during a protest outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013, after Egypt's military issued an ultimatum. (AP Photo/Khalil Hamra)

  • An opponent of Egypt's Islamist President Mohammed Morsi holds a banner with Arabic that reads, "leave," during a protest outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013. (AP Photo/Hassan Ammar)

  • A dog wearing a sign around his neck with Arabic that reads, "leave," accompanies its handler to a protest against Egypt's Islamist President Mohammed Morsi outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013. (AP Photo/Hassan Ammar)

  • Opponents of Egypt's Islamist President Mohammed Morsi protest outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013. (AP Photo/Hassan Ammar)

  • An opponent of Egypt's Islamist President Mohammed Morsi blows a whistle during a protest outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013. (AP Photo/Hassan Ammar)

  • Opponents of Egypt's Islamist President Mohammed Morsi protest outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013. (AP Photo/Hassan Ammar)

  • An Egyptian protester dances while chanting slogans against Islamist President Mohammed Morsi during a rally in Tahrir Square in Cairo, Monday, July 1, 2013. (AP Photo/ Manu Brabo)

  • Protesters pray during a demonstration against Egypt's Islamist President Mohammed Morsi in Tahrir Square in Cairo, Monday, July 1, 2013. (AP Photo/ Manu Brabo)

  • Egyptian protester stands on a roof near Tahrir Square during a demonstration against Egypt's Islamist President Mohammed Morsi in Tahrir Square in Cairo, Monday, July 1, 2013. (AP Photo/Manu Brabo)

  • A Egyptian protester waves a national flag in Tahrir Square during a demonstration against Egypt's Islamist President Mohammed Morsi in Cairo, Monday, July 1, 2013. (AP Photo/ Manu Brabo)

  • Fireworks light the sky as opponents of Egypt's Islamist President Mohammed Morsi protest outside the presidential palace in Cairo, Egypt, Monday, July 1, 2013. (AP Photo/Khalil Hamra)

  • Opponents of Egypt's Islamist President Mohammed Morsi chant slogans during a protest outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013. (AP Photo/Hassan Ammar)

  • Opponents of Egypt's Islamist President Mohammed Morsi chant slogans during a protest outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013. (AP Photo/Hassan Ammar)

  • An opponents of Egypt's Islamist President Mohammed Morsi blows a stadium horn during a protest outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013. (AP Photo/Hassan Ammar)

  • Opponents of Egypt's Islamist President Mohammed Morsi stand on railway bars during a protest outside the presidential palace, in Cairo, Monday, July 1, 2013. (AP Photo/Hassan Ammar)

  • Opponents of Egypt's Islamist President Mohammed Morsi chant slogans during a protest outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013. (AP Photo/Hassan Ammar)

  • An opponent of Egypt's Islamist President Mohammed Morsi holds a poster with Arabic that reads, "Tamarod, down with the Muslim Brotherhood regime, 6/30, in front of Itihadeya," during a protest outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013. (AP Photo/Hassan Ammar)

  • Opponents of Egypt's Islamist President Mohammed Morsi wave national flags during a protest outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013. (AP Photo/Nariman El-Mofty)

  • Opponents of Egypt's Islamist President Mohammed Morsi protest outside the presidential palace, in Cairo, Egypt, Monday, July 1, 2013. The banner at center, with Arabic writing, reads, "leave." (AP Photo/Hassan Ammar)

  • Supporters of Egypt's Islamist President Mohammed Morsi wave national flags and his posters during a rally in Nasser City, Cairo, Egypt, late Monday, July 1, 2013. (AP Photo/ Amr Nabil)

  • An military helicopter flies over an opponent if Egyptian Islamist President Mohammed Morsi as he waves a national flag, in Tahrir Square in Cairo, Egypt, Tuesday, July 2, 2013. (AP Photo/Amr Nabil)

  • An Egyptian protester waves his national flag as thousands celebrate on July 1, 2013 in Cairo's landmark Tahrir square after Egypt's armed forces gave President Mohamed Morsi 48 hours to meet the demands of the people or it would intervene with a roadmap. (GIANLUIGI GUERCIA/AFP/Getty Images)

  • Egyptian opposition protesters celebrate on July 1, 2013 in Cairo's landmark Tahrir square after Egypt's armed forces gave President Mohamed Morsi 48 hours to meet the demands of the people or it would intervene with a roadmap. (GIANLUIGI GUERCIA/AFP/Getty Images)

  • Laser lights are directed by Egyptian protestors on military helicopters flying over the presidential palace in Cairo as hundreds of thousands of Egyptian demonstrators gather at the Egyptian Presidential Palace during a protest calling for the ouster of President Mohamed Morsi on July 1, 2013 in Cairo, Egypt. (GIANLUIGI GUERCIA/AFP/Getty Images)

  • Laser lights directed by Egyptian protestors are seen on military helicopters flying over the presidential palace in Cairo as Hundreds of thousands of Egyptian demonstrators gather at the Egyptian Presidential Palace during a protest calling for the ouster of President Mohamed Morsi on July 1, 2013 in Cairo, Egypt.(GIANLUIGI GUERCIA/AFP/Getty Images)