Two people, one an American, were killed when protesters stormed an office of Egypt's ruling Muslim Brotherhood in Alexandria, adding to growing tension ahead of mass rallies aimed at unseating the Islamist president.
A third man was killed and 10 injured in an explosion during a protest in Port Said, at the mouth of the Suez Canal.
Police on Saturday said the cause was unclear but protesters, believing it was a bomb, attacked an Islamist party office in the city.
Egypt's leading religious authority warned of "civil war" after violence in the past week that had already left several dead and hundreds injured. They backed President Mohamed Mursi's offer to talk to opposition groups ahead of organised protests on Sunday.
The United Nations, European Union and United States have appealed for restraint and urged Egypt's deadlocked political leaders to step back from a confrontation threatening the new democracy that emerged from the Arab Spring revolution of 2011.
The US embassy said in a statement it was evacuating non-essential staff and family members and renewed a warning to Americans not to travel to Egypt unless they had to.
The Muslim Brotherhood said eight of its offices had been attacked on Friday, including the one in Alexandria.
Officials said more than 70 people had been injured in the clashes in the city. One was shot dead and a young American man who was using a small camera died after being stabbed in the chest.
A Brotherhood member was also killed overnight (local time) in an attack on a party office at Zagazig, in the heavily populated Nile Delta, where much of the recent violence has been concentrated. Mursi's movement said five supporters in all had died this week.
"Vigilance is required to ensure we do not slide into civil war," said clerics at Cairo's ancient Al-Azhar institute, one of the most influential centers of scholarship in the Muslim world.
In a statement broadly supportive of Mursi, they backed his offer of dialogue and blamed "criminal gangs" who besieged mosques for the violence. The Brotherhood warned of "dire consequences" and "a violent spiral of anarchy".
It accused liberal leaders, including former UN diplomat Mohamed ElBaradei, of personally inciting violence by hired "thugs" once loyal to ousted dictator Hosni Mubarak.
Opposition leaders condemned the violence. The army, which has warned it could intervene if political leaders lose control, issued a statement saying it had deployed across the country to protect citizens and installations of national importance.
In the capital, Cairo, tens of thousands turned out for rival events some miles apart and there was little trouble. An Islamist rally included calls to reconciliation. On Tahrir Square, cradle of the uprising against Mubarak, there was a festive atmosphere and a determination to shake Mursi on Sunday.
In Alexandria, as several thousand anti-Mursi protesters marched along the seafront, a witness saw about a dozen men throw rocks at guards outside the Brotherhood office. They responded. Bricks and bottles flew. Guns were fired.
Officials said dozens were wounded by birdshot. The party office was ransacked and documents were burned, watched by jubilant youths chanting against Egypt's Islamist leaders.
In Port Said, a bastion of anti-Islamist sentiment, police had suspected an accident but later said a device exploded among protesters. Canal traffic has not been affected by violence.
Islamists gathered around a Cairo mosque after weekly prayers to show support for Mursi. His opponents hope millions will turn out on Sunday to demand he step down, a year to the day after he was sworn in as Egypt's first freely chosen leader.
Mursi, backed by the Brotherhood, has dismissed such demands as an assault on democracy, setting up an angry confrontation.
"I came to support the legitimate order," said Ahmed al-Maghrabi, 37, a shopkeeper from the Nile Delta city of Mansoura whose hand bore grazes from street fighting there this week. "I am with the elected president. He needs to see out his term."
Some speakers reflected fear and anger among Islamists that opponents aim to suppress them as Mubarak did. But there was also talk from the podium of the need for dialogue - a concern also of international powers worried by the bitter polarization.
A few hundred opposition protestors gathered outside the presidential palace, a focus for Sunday's rally. Mursi has moved elsewhere. Thousands turned out after dark in Tahrir Square, waving national flags and sampling street food.
Abdelhamid Nada, a 32-year-old accountant, had come from the provinces with eight friends to camp out "until Mursi goes".
"The Muslim Brotherhood has no plan at all," he said, standing by his white tent.
"They don't have any economic plan, they don't have any social plan, they don't have any political plan."
The army, which heeded mass protests in early 2011 to push Mubarak aside, has warned it will intervene again if there is violence, and to defend the "will of the people". Both sides believe that means the military may support their positions.
The United States, which funds Egypt's army as it did under Mubarak, has urged compromise and respect for election results. Egypt's 84 million people, control of Suez and its peace treaty with Israel all contribute to its global strategic importance.
UN chief Ban Ki-moon urged Egyptians to respect "universal principles of peaceful dialogue". European Union foreign policy chief Catherine Ashton called for peaceful protests, building trust and a "spirit of dialogue and tolerance".
In Alexandria, opposition marchers said they feared the Brotherhood was usurping the revolution to entrench its power and Islamic law. Others had economic grievances, among them huge lines for fuel caused by supply problems and panic buying.
"I've nothing to do with politics, but with the state we're in now, even a stone would cry out," said 42-year-old accountant Mohamed Abdel Latif. "There are no services, we can't find diesel or gasoline. We elected Mursi, but this is enough.
"Let him make way for someone else who can fix it."
It is hard to gauge how many may turn out on Sunday, but even those sympathetic to Islamic ideas are frustrated by the economic slump and many blame the government.
Previous protest movements since the fall of Mubarak have failed to gather momentum, however, among a population anxious for stability and fearful of further economic hardship.