An army officer and two civilians were shot dead in clashes between an armed gang and Egyptian army and police in the north Sinai town of el-Arish.
About 100 armed men rode through el-Arish on motorcycles and vehicles waving flags with Islamic slogans and firing in the air, terrifying the local population.
The gang then attacked a police station, engaging in a shootout with Egyptian police and army that left one army officer dead.
A 70-year-old man and a 13-year-old boy who were caught up in the shooting died from bullet wounds.
Another army officer and 11 security guards were wounded in the attack and taken to an army hospital for treatment.
The identity of the attackers was not known.
Witnesses said the attackers, many of whom wore masks, did not seem to be from the area as they lost their way several times before reaching the police station.
Meanwhile, more than 30 political parties and movements withdrew from a rallythat was organised to send a united message to the ruling army about reform, saying the event was hijacked by Islamist groups.
Islamists and more liberal groups have diverged on how hard to press the ruling generals for change.
They have also been divided over the fate of the constitution, which is to be re-written after parliament is elected later this year.
Liberal groups fear the Muslim Brotherhood, Egypt's best organised group, and other Islamists will dominate the vote.
A joint statement by more than 30 groups said Islamists and other groups had agreed on demands to make today 'to thwart attempts by the military council to divide the revolutionaries and distort their image'. But the groups said 'some Islamic currents' violated this agreement.