“The armed forces conducted a special operation based on intelligence about the terrorist shelter … in Sinai’s north, two dangerous extremists were killed during a shootout”, al-Rifai said in a statement.
The operation came one day after 10 Egyptian soldiers were killed or wounded during a blast targeting an armoured vehicle in the same area.
The military also seized weapons, ammunition and explosive devices.
The north of the Sinai Peninsula has long been Egypt's most tense region due to the presence of violent extremists there. Militants frequently conduct attacks against police and army on the peninsula.