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 spells 'Out.' (KHALED DESOUKI/AFP/Getty Images)
CAIRO - An adviser to Egyptian President Mohammed Morsi said Wednesday that a military coup was underway, that tanks were on the move outside Cairo and that communication with the president had been cut off.
As a military deadline came and went for Morsi to step aside, the army took control of state television, and boisterous crowds opposed to the regime cheered and danced in Tahrir Square.
Representatives of the Muslim Brotherhood, which supports Morsi, also said that some of its leaders had been rounded up and arrested.
WATCH LIVE | Coverage of events in Egypt
PHOTOS | Massive unrest in Egypt
Earlier in the day, both the president and the military had sworn a fight to the death. The military leader, Gen. Abdel Fattah al-Sisi, said it would be an honor to die rather than subject the Egyptian people to threats or terror.
In something of a call to arms, the military posted on Facebook: "We swear to God to sacrifice with our blood for Egypt and its people against any terrorist, extremist or ignoramus. Long live Egypt and its proud people."
The government said at least 16 people had been killed and about 200 injured in clashes with security forces at Cairo University.
Egypt elected Morsi one year ago after throwing out Hosni Mubarak, the autocrat who led the country for three decades. But Egyptians have been frustrated by a weak economy and what they see as a power grab by the Morsi government.
The military was believed to have given Morsi until 5 p.m. local time, or 11 a.m. ET, to meet the demands of the protesters. The precise time was not clear. The ultimatum, issued Monday, has been denounced by supporters of Morsi as a military coup.
Hours ahead of the deadline, civilian political leaders were summoned to meet with the top generals. Those civilian leaders included Mohamed ElBaradei, the former head of the U.N. nuclear weapons agency and a critic of Morsi.
The Associated Press reported that a leading Muslim cleric and the head of Egypt's Coptic Christians were also at the meeting.
Sources told NBC News that the army had control of state television. Non-essential staff were told to go home early, and Reuters reported that the building was being guarded by armored vehicles. The Associated Press reported that military officers were monitoring broadcasts.
There were other signs that support for Morsi was slipping, even among sympathizers. A senior member of a hardline Islamist party allied with the president told Reuters that the party was trying to broker a peaceful transfer of power to avoid bloodshed.
"We find ourselves faced with the necessity of convincing the president to accept a referendum on early presidential elections," Tarek al-Zumar of Gamaa Islamiya said in a telephone interview. "This is what we hope will be reached in the next few hours."
The military controlled Egypt from February 2011, when protesters forced the ouster of President Hosni Mubarak, until June 2012, when Morsi won a competitive election and was sworn in.
While Morsi is still supported by Egypt's Muslim Brotherhood, furious protesters are dissatisfied with his performance, frustrated by a struggling economy and what they see as a presidential power grab. The Obama administration and the United Nations have encouraged Morsi to listen to his people.
Tamarod, a protest movement, called for supporters to rally at the headquarters of the Republican Guard, where Morsi was believed to be staying.
The opposition Dustour Party, whose name means Constitution, said Morsi was leading the country toward violence. It asked the army to protect the people "after Morsi lost his mind and incited bloodshed of Egyptians."
The military has said it will impose its own "road map" for the future if Morsi does not meet the protesters' demands Wednesday.
In his speech, which was loud and passionate, Morsi blamed loyalists of Mubarak, his predecessor, for fighting against democracy and challenging his leadership through the current wave of protests.
He asked Egyptians not to confront the military or use violence against its forces, the police or the interior ministry. Earlier in the day, he had demanded that the armed forces withdraw their ultimatum.
The Muslim Brotherhood, backing Morsi, called for counter-demonstrations, and a pro-Morsi rally in a Cairo suburb appeared to attract about 100,000 people, journalists for Reuters said.
The U.S. Embassy warned Americans in Egypt to avoid large gatherings and monitor local news.
"Even demonstrations or events intended to be peaceful can turn confrontational and possibly escalate into violence," it said, adding the embassy was closed.
The crisis could have a significant effect on the global economy. The benchmark price of crude oil for delivery in August rose by $2.22 to $101.82 a barrel in electronic trading on the New York Mercantile Exchange, the highest since early May last year.
Egypt's control of the Suez Canal - one of the world's busiest shipping lanes, which links the Mediterranean with the Red Sea - gives it a crucial role in maintaining global energy supplies.