At least five soldiers were killed and two injured on Friday by a roadside bomb in Egypt's restive Northern Sinai where the government faces an Islamic State-led insurgency, medics and security sources said.

The explosive device went off when an armoured vehicle passed by killing and injuring the soldiers, the sources said.

The most populous Arab country is battling an insurgency that gained pace after its military overthrew President Mohamed Mursi of the Muslim Brotherhood, Egypt's oldest Islamist movement, following mass protests against his rule in mid-2013.

The insurgency, mounted by Islamic State's Egyptian branch in the Sinai peninsula, has killed hundreds of soldiers and police and started to attack Western targets within the country.

President Abdel Fattah al-Sisi, the former military chief who led Mursi's ouster, describes Islamist militancy as an existential threat to Egypt, an ally of the United States. Islamic State controls large parts of Iraq and Syria and has a presence in Libya, which borders on Egypt.