Cairo (AFP) - Militants killed 18 people in an attack Monday on a security convoy in Egypt's North Sinai, where police and troops are battling a jihadist insurgency, security and medical sources said.

The interior ministry confirmed an attack around the town of Bir al-Abed had caused deaths and injuries but did not provide a toll.

An Islamic State group affiliate based in North Sinai has killed hundreds of soldiers and police in attacks since the military in 2013 ousted Islamist president Mohamed Morsi.

Monday's incident took place when a vehicle tried to break through a security convoy passing between Qantara near the Egyptian port city of Ismailiya, and El-Arish, the capital of North Sinai.

IS claimed responsibility for the attack, saying it killed eight Egyptian soldiers in an ambush on the outskirts of El-Arish, according to the Aamaq news agency, which is affiliated with IS.

"As the forces dealt with the car, it blew up," the ministry said.

The explosion was followed by a shootout with "militant elements who were hiding in the desert area alongside the road," the ministry said.

"This led to the martyrdom of some of the convoy's individuals and the injury of others," it said.

It was not immediately clear whether any civilians were among the dead.

The United States condemned the attack.

"We will continue to stand with Egypt as it confronts the threat from terrorism," the State Department said in a statement.

While based in North Sinai, the IS affiliate in Egypt has carried out attacks elsewhere including in Cairo, and has claimed attacks that have killed more than 100 Coptic Christians since December.