At least 30 people were killed when Islamist militants attacked several checkpoints in Egypt's North Sinai on Wednesday, security and medical sources said, in one of the biggest coordinated assaults yet in the insurgency-hit province.
Islamic State's Egyptian affiliate, Sinai Province, claimed responsibility for the attacks in a statement on Twitter.
It was the second high-profile action in Egypt this week.
On Monday, the prosecutor-general was killed in a car bombing in Cairo, raising questions about the government's ability to contain the insurgency.
The army said five checkpoints were attacked by about 70 militants and that soldiers had destroyed three landcruisers fitted with anti-aircraft guns.
Security sources said militants were surrounding a police station in the town of Sheikh Zuweid and had planted bombs around it to prevent forces from leaving.
Doctor Osama el-Sayed of El-Arish General Hospital in the provincial capital said 30 bodies had been brought in, "some of whom were wearing army fatigues".
The exact breakdown of identities of those killed was not immediately clear.
Security sources had said at least 20 security personnel were killed and 40 wounded. The army spokesman said 22 of the attackers were killed and 10 soldiers were killed or wounded.
Security sources said the militants had planted bombs along a road between Sheikh Zuweid and an army camp to prevent the movement of any army supplies or reinforcements. Meanwhile, Apache helicopters and F-16 planes strafed the area.
The insurgency based in the Sinai is seeking to topple the Cairo government and has managed to defy one of the toughest security crackdowns in Egypt's history.
It has intensified since 2013, when then-army chief Abdel Fattah al-Sisi removed President Mohamed Mursi, an Islamist, after mass protests against his rule. Hundreds of policemen and soldiers have been killed in attacks since then.
The most active militant group in the region is Sinai Province, which has pledged allegiance to Islamic State.
It said in Wednesday's statement that it had attacked more than 15 security sites and carried out three suicide bombings.
The group 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 a recent tactic, Sinai Province has fired rockets at the direction of an airport used by multinational peacekeeping forces.
In late April, the army extended by three months a state of emergency imposed in parts of Sinai since October after 33 security personnel were killed in an attack claimed by Sinai Province.
The army has taken several measures to crush the insurgency. Aside from bombardments in the region, they have destroyed tunnels into the Palestinian-ruled Gaza Strip and created a security buffer zone in northern Sinai.
The army was also digging a trench along the border with Gaza in an effort to prevent smuggling.
The measures have stoked resentment among some residents, who say they rely on the smuggling trade through the tunnels and complain of neglect by the state.
Tuesday also marked the second anniversary of protests that preceded the overthrow of Mursi.
President Sisi said he would bring in tougher legal measures in coming days after the killing of the prosecutor, Hisham Barakat, the most senior Egyptian official to die in such an attack in years.
Sisi's government does not distinguish between the now-outlawed Brotherhood and other militants. The Brotherhood says it is committed to peaceful activism.