An Egyptian affiliate of the jihadist Islamic State group claimed responsibility Friday for a bomb blast during a police raid on a Cairo apartment that killed seven people, including five policemen.

Thursday's explosion in the Al-Haram district, near the pyramids, came as police raided a flat suspected to be a militant hideout and tried to defuse an explosive device, the interior ministry said on its Facebook page.

The ministry blamed the banned Muslim Brotherhood movement of ousted president Mohamed Mursi for the blast.

However, an Egyptian affiliate of IS said it lured the officers to the apartment, which was "rigged with bombs".

"When the infidels entered, the bomb-rigged house was blown up," the Islamic State Egypt group said in a statement posted on jihadist websites.

The interior ministry said a group of Brotherhood members had been using the apartment to manufacture explosives.

The blast killed five policemen, one civilian and an unidentified man, a police official said on Friday, updating an earlier toll.

The interior ministry posted pictures of the five dead policemen on its Facebook page.

Thirteen other people were wounded in the blast, it added.

Al-Haram has witnessed several attacks and gunfights since the army ousted Islamist leader Mursi in July 2013.

The neighbourhood is known to house many Mursi sympathisers and has been the scene of clashes between his supporters and security forces in the aftermath of his ouster by then army chief and now President Abdel Fattah al-Sisi.

It also houses several hotels used by tourists visiting Cairo because of its proximity to the world-famous pyramids.

Militants have regularly attacked policemen and soldiers since the army toppled Mursi.

Jihadists say their attacks are in retaliation for a brutal government crackdown targeting Mursi's supporters that has left hundreds dead and thousands imprisoned.

Mursi was Egypt's first freely elected president and succeeded longtime autocrat Hosni Mubarak, who was driven from power after an 18-day popular uprising.

On Monday, Egypt marks the fifth anniversary of the anti-Mubarak revolt, and Sisi has warned against any form of demonstration on that day.