Eight police officers have been killed in a Cairo suburb, the Egyptian interior ministry said, in an attack claimed by the Islamic State of Iraq and the Levant group (ISIL, also known as ISIS).

The ministry said on its official Facebook page on Sunday that four men armed with automatic weapons got out of a small pick-up truck, sprayed a police minibus with bullets and then fled.

The ministry added that a lieutenant and seven low-ranking policemen in plain clothes were killed in the attack.

Inside Story: Egypt in 'a state of war'?

Egyptian official news agency MENA said that the police were inspecting security in the south Cairo suburb of Helwan early on Sunday.

ISIL claimed the attack in a statement circulated on social media.

Interior Minister Magdy Abdel-Ghaffar ordered an investigation into the attack, calling the eight "heroes of the police martyrs who sacrificed their lives to preserve the security of the homeland and the people".

Armed groups, mainly based in North Sinai, stepped up attacks on soldiers and policemen after the army chief Abdel Fattah el-Sisi overthrew elected President Mohamed Morsi after protests against his rule in mid-2013 and replaced him.

The Ministry of the Interior says 732 members of the security forces have been killed in attacks since 2011 and 18,000 have been injured.

While most of the unrest has been centred in the northern part of the Sinai peninsula, there have been attacks in the rest of the country as well, mainly small-scale bombings targeting police. The frequency of attacks in the mainland had declined in recent months.

Source: Agencies