CAIRO - Mohammed Morsi, in office only a year as the first democratically elected leader of Egypt, was rousted from power by the military Wednesday as a euphoric crowd in Tahrir Square cheered his exit.
The commanding general of the armed forces, Gen. Abdel Fattah al-Sisi, said on Egyptian television that the constitution was suspended and that the head of the constitutional court would be the acting president. He said new elections would be held, with the timing to be determined later.
Armored vehicles, tanks and troops deployed throughout the Egyptian capital, the army seized the headquarters of state television, and the military convened a meeting with political opponents of Morsi and religious leaders.
RELATED: UNF student reports from Egypt
Morsi was elected a year ago after Egyptians ousted Hosni Mubarak, the autocrat who had ruled for almost three decades. Egyptians hoped he would build a more pluralistic and tolerant country.
Instead, Egyptians have been frustrated by a struggling economy and poor services and infuriated by what they see as power grabs by Morsi - stifling the judiciary and forcing through a constitution that favored Islamists and ignored minorities.
"Now we want a president who would really be the president of all Egyptians and will work for the country," Said Shahin, a 19-year-old protester in Tahrir Square, told The Associated Press.
The ouster will remake the politics of the Middle East at a volatile time. Egypt is the most populous country in the region, has a peace treaty with Israel and is a partner of the United States.
The Obama administration declined to take a side in recent days, saying only that it was committed to democracy, and watched with concern as the standoff between Morsi and the generals dragged on.
On Tuesday, the president gave a loud, passionate, 45-minute speech to the country, blaming loyalists of Mubarak for fighting against democracy and challenging his leadership.
"I am prepared to sacrifice my blood for the sake of the security and stability of this homeland," he said.
On Wednesday, as the military appeared to be taking control of parts of Cairo, advisers to Morsi said the generals were staging a coup and subverting the will of the people.
In Tahrir Square, however, the military announcement hours later was greeted with jubilation reminiscent of the first days of the Arab Spring two years ago. Tens of thousands of people shot fireworks, sang, danced, chanted and waved Egyptian flags.
The whereabouts of the president, an Islamist backed by the Muslim Brotherhood, were unknown. A day earlier, he had vowed to stay in power and said he was prepared to die for the cause.
Before they deposed Morsi, Egyptian military officials assured the U.S. that the military would not assume long-term control of the government, and ensured the safety of the U.S. Embassy, personnel and all Americans in Egypt, U.S officials told NBC News.
Defense Secretary Chuck Hagel and the chairman of the joint chiefs of staff, Gen. Martin Dempsey, had been in contact with their counterparts in the Egyptian military over the past week.
The meeting convened by Egyptian military earlier in the day included Mohamed ElBaradei, the former head of the U.N. nuclear weapons agency and a critic of Morsi, as well as a leading Sunni Muslim cleric and the head of Egypt's Coptic Christians.
The military had given Morsi 48 hours to step aside or share power. In a statement posted to Facebook in the final hours before the deadline, the military swore its own fight to the death.
"We swear to God to sacrifice with our blood for Egypt and its people against any terrorist, extremist or ignoramus," the military said in a statement. "Long live Egypt and its proud people."
At least 16 people were killed during the day and more than 200 injured in clashes, primarily around Cairo University.
In Washington, the State Department said it before the military announcement that it could not confirm reports of a coup but was watching the situation closely. The U.S. Embassy warned Americans in Egypt to avoid large gatherings and monitor local news.
At state TV headquarters, 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 crisis could have a significant effect on the global economy. The benchmark price of crude oil for delivery in August rose above $102 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.
Reuters and The Associated Press contributed to this report. Ian Johnston reported from London and Erin McClam from New York.
By Richard Engel, Charlene Gubash and Erin McClam, NBC News