At least 18 Egyptian policemen were killed and three injured on Monday in an ISIL attack on a security convoy in the Sinai Peninsula.

Security and medical sources said the attack took place near Arish, the capital of North Sinai province, and two of those killed were officers. A brigadier general lost a leg in the blast.

Militants detonated an improvised explosive device and managed to destroy three armoured vehicles and a signal-jamming vehicle. The attack later turned into a gunfight and the militants also shot at ambulance workers, injuring four.

ISIL said it had carried out the attack.

The extremist group is waging an insurgency in the rugged, thinly populated Sinai. They have killed hundreds of soldiers and police since 2013, when the military ousted Egypt's Islamist president Mohamed Morsi after mass protests against his rule.

At least 23 Egyptian soldiers were killed when suicide car bombs tore through two military checkpoints in North Sinai in July, in one of the bloodiest assaults on security forces in years.

The Interior Ministry confirmed the attack on Monday took place and that several policemen were killed or injured. It did not provide any casualty figures.