More than 100 people are reported to have been killed in Egypt in a series of attacks by a group affiliated to the so-called Islamic State group.
Egypt's army said "more than 100 militants" and 17 soldiers were killed after simultaneous assaults on military checkpoints in North Sinai.
After a day of fighting, which involved F-16 jets and Apache helicopters, the army said it would not stop its operations until it had cleared the area of all "terrorist concentrations".
By tonight, an army spokesman said the situation in North Sinai was "100% under control".
Security sources and witnesses later said aerial bombardments on militant targets had resumed.
IS's Egyptian affiliate, Sinai Province, claimed responsibility, saying it attacked more than 15 security sites and carried out three suicide bombings.
The militants' assault was a significant escalation in violence in the peninsula that lies between Israel, Gaza and the Suez Canal.
It was the second high-profile attack in Egypt this week; on Monday a bomb killed the prosecutor-general in Cairo.
It raised questions about the government's ability to contain an insurgency that has already killed hundreds of police and soldiers.
The insurgents want to topple the Cairo government and have stepped up their campaign since 2013, when then-army chief Abdel Fattah al-Sisi removed President Mohamed Mursi of the Muslim Brotherhood after mass protests against his rule.
Sisi, who regards the Brotherhood as a threat to national security, has since overseen a harsh crackdown on Islamists.
An army statement said the fighting had been concentrated in the towns of Sheikh Zuweid and Rafah and that the militants used car bombs and various weapons.
Of the 17 soldiers killed, four were officers, and 13 more soldiers were wounded, the statement said.
Some security sources put the death toll for army and police much higher.
Earlier, security sources said militants had surrounded a police station in Sheikh Zuweid and planted bombs around it.
The militants were also said to have planted bombs along a road between Sheikh Zuweid and al-Zuhour army camp and seized two armoured vehicles, weapons and ammunition, the sources said.
IS had urged its followers to escalate attacks during the Islamic holy month of Ramadan, which started in mid-June, though it did not specify Egypt as a target.
In April, the army extended by three months a state of emergency imposed in parts of Sinai.