Rival demonstrators filled the streets of Cairo and other Egyptian cities late Wednesday after expiration of an army ultimatum to Islamist President Mohamed Morsi, demanding that he act to resolve the country's political crisis.
Crowds of Morsi's opponents have been demanding his ouster. Egypt's powerful military moved armored vehicles into central Cairo to restrict travel by the president and senior members of his Muslim Brotherhood organization.
Security officials said troops with armored vehicles had secured Egyptian state television studios in the center of the capital.
One of Morsi's top advisers said the country was in the midst of "a military coup," and he called for peaceful resistance by civilians.
In a statement issued just before the army deadline elapsed, Morsi said his solution for the national unrest would be appointment of a government of national consensus and an independent committee to amend the constitution. But he repeated that he had no intention of stepping down and said his electoral legitimacy is the only safeguard against instability.
The army gave Morsi 48 hours to resolve the political impasse or risk military intervention. Military leaders said they would impose a "roadmap" for Egypt if differences between the Islamist government and its opponents were not resolved by 5 p.m., local time (1500 UTC) Wednesday, but that deadline passed without any visible action.
Soon afterward, a military helicopter circled over huge crowds of Morsi opponents cheering and waving Egyptian flags in Cairo's Tahrir Square. A few kilometers away, a pro-government rally was underway.
Millions more Egyptians were in the main squares of cities nationwide for a fourth straight day. Many of them said they support Egypt's first democratically elected civilian leader, but larger numbers said they want Morsi to resign, with early elections to follow.
Egypt's interior ministry warned that police would respond firmly to any violence. The past week of clashing rallies has killed almost 40 people, including 18 during violence overnight near Cairo University.
Earlier Wednesday, army commander Abdel Fattah al-Sisi met with pro-reform leader Mohamed ElBaradei, the country's top Muslim and Coptic Christian leaders and some smaller, Islamist parties. Authorities said they were discussing the way forward for Egypt. The ruling Muslim Brotherhood's political arm the Freedom and Justice Party refused to meet with the army chief, saying it recognizes only the authority of President Morsi.
Watch: Live video from Tahrir Square
In a separate development that increased political pressure on Morsi, Egypt's top judicial body confirmed the reinstatement of public prosecutor Abdel Meguid Mahmud, whom the president dismissed last year.
In a speech Tuesday night, President Morsi vowed to remain in office, even if it resulted in his death. He also demanded the military withdraw its threat to intervene in the political crisis.
Morsi's Muslim Brotherhood angrily rejected what it said was the army's attempt to seize power. The Brotherhood's spokesman, Gehad El-Haddad, told VOA the group would take direct action against any attempt to force Morsi to step down, but he added the president's supporters would not take up arms and go after the military:
"If the tanks roll up to the president, we're going to stand in their way. And then the tanks have one of two choices: they roll over us and our dead bodies, or they stand still and respect the legitimacy of our president. There is no third option here," said El-Haddad.
A spokesman for Egypt's opposition Tamarud Movement said Morsi's time is up:
"The hour of victory has neared," the opposition figure said. "There are only a few hours left in the deadline set by the armed forces for this illegitimate president to leave the presidential palace. I believe it is our duty to go out and express our will so we can protect it."
Egypt's state-run news agency and other media reported portions of the military's plan had been circulated in advance. They said military officials were prepared to suspend the constitution, dissolve the legislature and set up an interim administration.
The army has said it is not interested in long-term political power. But that assurance was rejected by Haddad and other Muslim Brotherhood members, many of whom are suspicious of the military's backing of decades of harsh, authoritarian rule.