About 100 armed men rode through the town of el-Arish on Friday in cars and on motorcycles, waving flags with Islamic slogans and firing in the air, Sinai security sources said.
They attacked a police station and engaged in a shootout with policemen and soldiers, the sources said. An army officer and three civilian bystanders were shot dead. A policeman and a Palestinian suspect were reported to have died later from injuries suffered in the battle.
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.
There was no word on the identity of the armed group, but MENA quoted the head of security in north Sinai as saying Egyptians and Palestinians were among 12 suspects arrested and under investigation.
The Gaza Strip, ruled by the Palestinian Islamist group Hamas, borders Sinai to the north.
A statement from the health ministry identified the three civilian dead as an 18-year-old man, a boy of 13 and a 70-year-old man.
Four army officers, nine security guards, two policemen and six civilians were wounded in the attack, MENA and a security source said.
(Reporting by Yusri Mohamed, Marwa Awad and Shaimaa Fayed; Writing by Marwa Awad and Shaimaa