A security official in Egypt says clashes between soldiers and wanted al-Qaida-inspired militants in the northern Sinai Peninsula have killed two soldiers and wounded eight.

The official says heavy gunfire Friday rocked a village called el-Mahdiya along the border between Egypt and the Gaza Strip. He says troops backed by armored vehicles are fighting against three of the most-wanted Ansar Jerusalem militants, including Shadi el-Manaei, a suspected mastermind of the previous attacks.

The official spoke on condition of anonymity because he was not authorized to speak to journalists.

Ansar Jerusalem, like other Sinai-based al-Qaida-inspired groups, have been blamed for rising attacks against Egypt's military and police since the military ousted former Islamist President Mohammed Morsi on July 3.