CAIRO — Egypt's military announced Wednesday it was winding down its largest campaign in the Sinai against Islamists, following a 16-day operation in which it said scores of Islamic State group jihadists were killed.

The army said the campaign in the Sinai Peninsula had "achieved its goals" in destroying militant hideouts and equipment, in joint operations by special forces, armored divisions and the air force.

The next phase would see the military and police assert full control over the North Sinai towns of El-Arish, Sheikh Zuweid and Rafah, it said in a statement.

In previous statements on the campaign, the military had announced having killed scores of militants and captured dozens.

The operation to quell a two-year-old insurgency came less than three months after Islamic State launched its most ambitious attack in Sinai, briefly seizing parts of the town of Sheikh Zuweid before F-16 air strikes forced its retreat.

The military said the attack on July 1 killed 17 soldiers.

A health ministry spokesman had been quoted by the state-owned Ahram news site as giving a toll of 21 soldiers, but he has since clarified to AFP that the tally included four civilians.

Islamist militants have killed hundreds of soldiers and policemen in attacks since the army overthrew Islamist president Mohamed Morsi in 2013, ushering in a crackdown on his supporters.

Most of the attacks have been in the sparsely populated north of the Sinai Peninsula, which borders the Gaza Strip and Israel.

Militants in Sinai last year pledged allegiance to the Islamic State group that controls parts of Iraq and Syria.