The Islamic State group's affiliate in Egypt claimed the attack in a statement posted on social media.
The official MENA news agency had earlier reported five soldiers killed, quoting security officials.
The discrepancy could not immediately be explained as journalists have limited access to the restive peninsula where jihadists are waging a deadly insurgency.
The military said it killed 20 militants on July 18 in an assault on a jihadist hide-out, posting video of air strikes on a building and two trucks on its spokesman's Facebook page.
Militants loyal to the Islamic State group have killed hundreds of soldiers and policemen in attacks since the military overthrow of president Mohamed Morsi in 2013, which unleashed a deadly crackdown on his Islamists supporters.
On July 16, the militants claimed responsibility for a missile attack on a navy vessel off North Sinai.
The army said no navy men were killed in the attack.
Comments