CAIRO, Egypt — Egypt's military has suspended the Islamist-backed constitution and called early elections.
The military also announced that embattled President Mohammed Morsi will be replaced.
Cheers erupted among millions of protesters nationwide who were demanding Morsi's ouster.
Massive Celebrations in Cairo
The streets of Cairo erupted in cheers after an announcement by Egypt's military chief that President Mohammed Morsi was being replaced with the head of Egypt's powerful constitutional court.
Are you viewing this story on our mobile or tablet app? Click here to see photos and video from around Egypt on our full site.
Updated from earlier
The army's 48-hour deadline for Egyptian President Mohamed Morsi to end the nation’s political crisis has passed. A military spokesman says the army continues to talk with Egyptians from all walks of life about the crisis and will issue a statement later.
CAIRO (AP) -- Staffers at Egypt's state TV say military officers are present in the newsroom at the influential broadcaster, monitoring its output, shortly ahead of the expiration of the army's deadline to the Islamist president.
The staffers say the officers of the military information department were checking content Wednesday but not interfering.
The military also beefed up the presence of troops inside the building, the staffers said, though they were not visible outside. Even before the crisis, a small army contingent usually guards the state TV headquarters.
The military appears to be tightening its control over sensitive institutions before the expiration of military ultimatum to President Mohammed Morsi.
THIS IS A BREAKING NEWS UPDATE. Check back soon for further information. AP's earlier story is below.
Egypt's military held an emergency meeting Wednesday hours ahead of its deadline for the country's embattled Islamist president to yield to the demands of millions of protesters or face intervention by the army, a defense official said.
Even as the clock ticked down toward the military's deadline around 4 p.m. (1400 GMT) local time, President Mohammed Morsi has remained defiant. In a speech late Tuesday night, he vowed not to step down and pledged to defend his legitimacy with his life in the face of three days of massive street demonstrations calling for his ouster.
The looming showdown follows a night of deadly clashes in Cairo and elsewhere in the country that left at least 23 people dead, most in a single incident near the main Cairo University campus. The latest deaths take to 39 the number of people killed since Sunday in violence between opponents and supporters of Morsi, who took office in June last year as Egypt's first freely elected leader.
The bloodshed, coupled with Morsi's defiant speech, contributed the sense that both sides are ready to fight to the end.
With his political fate hanging in the balance, Morsi demanded in a posting on his official Twitter account late Tuesday that the powerful armed forces withdraw their ultimatum, saying he rejected all "dictates" - from home or abroad. The army said if no agreement is reached between Morsi and the opposition it would intervene to implement a political road map of its own.
In his emotional, 46-minute address aired live to the nation late Tuesday, the Islamist leader 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.
Mahmoud Badr, spokesman for the youth movement behind the latest wave of protests, called on anti-Morsi protesters to demonstrate outside three presidential palaces as well as the Cairo headquarters of the Republican Guard, an army branch tasked with protecting the president, his family and presidential palaces. Morsi is thought to have been working at the Republican Guard headquarters since the start of the protests.
Badr also called on the army to place Morsi under arrest for his alleged incitement to civil war.
"Today is the day of decisiveness," Badr said at a news conference Wednesday.
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.
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.
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.