Egypt's Ministry of Interior says gunmen opened fire from a car and killed a senior police officer in northern Sinai.

The ministry says Maj. Gen. Khaled Kamal Osman was inspecting security positions late Wednesday in the city of el-Arish when the gunmen started shooting. Police fired back and the attackers fled the scene in a white car.

Security forces have cordoned off the area and are searching for the perpetrators.

Egypt is battling militants, including members of an Islamic State affiliate, who have largely targeted troops in the northern Sinai Peninsula since the 2013 military overthrow of Islamist President Mohamed Morsi.

A claim of responsibility by the IS branch in Egypt, known as Sinai Province of the Islamic State, is circulating on social media accounts of supporters.