Egypt's Interior Ministry says four masked gunmen have stormed a house in the northern Sinai Peninsula city of al-Arish and shot dead two policemen inside.

Al-Arish, a city on the Mediterranean, has been at the center of an insurgency by Islamic militants targeting members of the security forces and soldiers. The shooting took place early on Thursday.

The statement did not say who was behind the attack, which bore the hallmarks of Islamic militants.

Led by an affiliate of the extremist Islamic State group, the militants have been battling security forces for years in northern Sinai but their attacks have grown more frequent and deadly since the military's ouster in 2013 of Egypt's Islamist president, Mohammed Morsi. They have also carried assassinations and bombings in mainland Egypt.