The Egyptian Army says it killed 15 gunmen following the attack on a military post located near the town of Bir al-Abd.
Militants attacked an army checkpoint and killed 12 soldiers and wounded six others in Egypt's Sinai Peninsula on Friday, the Egyptian military said.
A gunfight erupted between security forces and assailants around the checkpoint, which is located 80 kilometres east of the Suez Canal near the town of Bir-el-Abd.
Egyptian security forces said 15 gunmen were also killed in the gunfight.
"An armed group of terrorist elements attacked a security checkpoint in North Sinai this morning using four-wheel drives and were immediately engaged. Our forces killed 15 terrorists," the military said in a statement.
"The clashes led to the martyrdom of 12 and injury of six armed forces heroes."
No group has claimed responsibility for the attack yet.
However, Ansar Bayt al Maqdis, which pledged allegiance to the Daesh terrorist organisation in 2014, frequently carries out similar attacks in the Sinai Peninsula.
The group intensified its campaign against the Egyptian state after a military coup overthrew Egypt's elected president, Mohamed Morsi, in 2013.
There has been a dramatic fall in the number of attacks claimed by Daesh on the Egyptian mainland in recent months.
Last month the group attempted to kill a senior assistant to Egypt's top prosecutor in an eastern suburb of Cairo with a car bomb.