Militants killed 18 people in an attack yesterday on a security convoy in Egypt's North Sinai, where police and troops are battling a jihadist insurgency, security and medical sources said.
Seven others were wounded in the attack, said security and military officials.
As a result, the raid's forces opened fire on the militants.
A number of weapons were found in the two apartments. The officials spoke on condition of anonymity because they were not authorised to brief media.
IS claimed it was behind the attack via its news agency Amaq.
Egypt's security forces killed 10 suspected militants on Sunday in a shootout during a raid on two apartments in central Cairo, the interior ministry said.
Monday's attack was the deadliest against security forces since July, when ISIS terrorists attacked a remote army outpost in the border town of Rafah, killing 23 soldiers. According to the military, thousands of militants have been killed in the operations held against them. The Muslim Brotherhood denies this.
The ambush came a day after authorities said they had caught a cell planning attacks in the capital, Cairo. Three officers were among the policemen killed, and a brigadier lost a leg. Police said the militants had sneaked into Cairo from the volatile northern Sinai.
Egypt has been suffering from a spike in terrorist attacks targeting civilians in the mainland over the past year.
Egypt has been fighting against a wave of terror activities that killed hundreds of policemen and soldiers since the military toppled former Islamist president Mohamed Morsi in July 2013 in response to mass protests against his one-year rule and his now outlawed Muslim Brotherhood group.