The protests' size is a stunning rejection and raises questions about Morsi's survival and whether the military might take control if violence spreads.

CAIRO — Hundreds of thousands of protesters swelled through villages and cities Sunday, denouncing Egypt's Islamist president and raising fears of a new revolution that could divide the nation, threaten its young democracy and sink its troubled economy.

Protesters against President Mohamed Morsi filled streets and squares, yelling "Leave, leave!" on the first anniversary of his inauguration. The chants echoed against distant cheers of support from Islamists who held rival rallies in what has become a dangerously polarized nation.

Scattered violence was reported as fireworks and lasers lighted the Sunday night sky. The state news agency said about 500 young men hurling stones and Molotov cocktails set ablaze the headquarters of Morsi's Muslim Brotherhood party in Cairo. Four people were killed — three of them outside a Brotherhood office in Assiut— in clashes in Upper Egypt. More than 220 were injured nationwide, according to security officials.

A youth movement, known as Rebel, has collected more than 22 million signatures on petitions calling for Morsi to step aside for early elections. The president and the Brotherhood have refused to budge and the military has deployed troops around government buildings and along the shipping lanes of the Suez Canal.

The breadth of the protests was a stunning rejection of Morsi, and the country's immediate future appeared to hinge on several questions: Can the president survive massive, sustained protests? Will the disparate opposition stay energized? And, if widespread violence ignites, will the military take control of the government as it did immediately after the uprising that overthrew autocrat Hosni Mubarak two years ago?

The army has remained inscrutable. Defense Minister Gen. Abdel Fattah Sisi has so far sided with the president and has not hinted at a military takeover. The army's rule from 2011 until Morsi's election drew condemnation from human rights groups and blemished its once stellar reputation among most Egyptians.

But Sisi has said he will not allow the country to veer into a "dark tunnel" of political collapse and economic turmoil. In a startling image of how much the public mood has changed over the last year, thousands of protesters, including young mothers and old men, cheered and waved flags at army helicopters flying overhead, a sign that many Egyptians would back a coup.

"When the military was in control, things were better. Now we have power cuts, no fuel, and everything's going bad," said Mohammad Khaled, a 19-year-old electrician who stood in Cairo's Tahrir Square beneath a clear sky. "Morsi promised he would fix many problems in his first 100 days but did nothing.... If he's not able to handle it, then he should let someone else do the work.

"We succeeded in removing Mubarak, who was here for 30 years; you don't think we can remove Morsi, who has only been here for a year?" Khaled said. "We've been preparing for this day for over two months, and I will stay until he says, 'I'm stepping down.'"

Presidential spokesman Ehab Fahmy told reporters, "Dialogue is the only way to reach mutual understanding and to reach national agreement around the different issues of our homeland."

Sweeping across boulevards and massing at the presidential palace, raising national flags and flying banners emblazoned with the images of those killed in protests, the protesters sought to revive the spirit of the uprising that toppled Mubarak. Morsi's supporters, however, accused their opponents of anarchy for resorting to the streets in a misguided attempt to unseat the country's first freely elected leader.

The battle for Egypt lies between these two poles, divided by sectarianism and driven by economic despair. These emotions were evident at anti-Morsi protests in Tahrir Square and the presidential palace, and amid prayer rugs and open Korans carried by Morsi loyalists in front of one of Cairo's main mosques.

"Egypt is our country, the land of the Nile that carries us all, and it's our duty to protect it without violence or committing assaults," Coptic Orthodox Pope Tawadros II, whose Christian minority has been increasingly persecuted by Islamists, said on Twitter. "The blood of every Egyptian is precious, please participate, but respect others."

The demonstrations Sunday were largely peaceful, often festive and at times marked by acts of kindness, such as residents pouring water off their balconies in Tahrir Square to cool protesters in the sweltering heat, and by moments of stillness, especially when Islamists prostrated in silence before the mosque.