An Egyptian police statement says three policemen and a civilian have been shot dead by suspected Islamic State group militants who ambushed their taxi in the coastal city of el-Arish in the Sinai Peninsula.

The statement by the el-Arish police headquarters says three militants riding a car cut off the taxi, got out and sprayed the three policemen and the driver with gunfire before fleeing the scene.

The driver was seriously wounded and later died in hospital.

Wednesday's attack is the latest in a war of attrition waged by militants led by an Islamic State group affiliate in the turbulent north of Sinai, where security forces have battled insurgents for years. The insurgency by Islamic militants in Sinai grew deadlier after the 2013 ouster of an Islamic president, Mohammed Morsi.