Islamic State's Egypt affiliate, the Sinai Province group, claimed it was behind a car bombing that injured 29 people near a state security building and courthouse in a Cairo suburb early on Thursday.
A statement circulated on Twitter by supporters of the group said the bomb was a reprisal for the execution of six of its members convicted of carrying out an attack in north of the Egyptian Capital last year.
"Let the apostates of the police and army, the followers of Jews, know we are a people who do not forget our revenge," the statement said.
In May, Egypt executed six members of Sinai Province for attacking soldiers near Cairo in 2014. The men were convicted on charges which included carrying out an attack in which two army officers were killed in Arab Sharkas village north of Cairo.
Sinai Province has killed hundreds of soldiers and police since the military toppled former president Mohammed Morsi of the Muslim Brotherhood in 2013 after mass protests against his rule.
Security sources who inspected the blast site in Shubra al-Khaima near Cairo said there was a burned-out vehicle and crater.
Comments on Twitter indicated the blast, which heavily damaged the face of the state security building, was heard in several parts of the Egyptian Capital.
Shopkeeper Mohammed Ali said he saw a man park a vehicle that exploded after he stepped away from it.
Militants based in Sinai who support Islamic State, which controls parts of Iraq and Syria and has a presence in Egypt's neighbour Libya, have proven resilient despite military operations against them.
Egyptian President Abdel Fattah al-Sisi has vowed to eradicate militancy, which he has said is an existential threat to the Arab world and the west.
Stabilising Egypt is critical to efforts to rebuild an economy hurt by turmoil since the 2011 uprising that toppled Hosni Mubarak.
Egyptian authorities have mounted the toughest security crackdown against militants in the country's history, drawing criticism from human rights groups who accuse the government of stifling dissent.
This month, Sisi approved an anti-terrorism law that sets up special courts and protects its enforcers in the face of a two-year-long Islamist insurgency that aims to topple his government.
The law has come under fire from human rights groups that accuse Sisi of rolling back freedoms won in the 2011 uprising.