Two attacks in Egypt's Sinai Peninsula killed 33 security personnel, security sources said, in some of the worst anti-state violence since Islamist President Mohamed Morsi was overthrown last year.
The violence prompted Egypt to declare a three-month state of emergency in parts of North Sinai, where the violence took place, the state news agency reported.
The attacks are a setback for the government, which had managed over the past few months to make some progress in the struggle against an Islamist militant insurgency in the Sinai as it focuses on trying to repair the economy.
President Abdel Fattah al-Sisi has also expressed serious concerns over militants who are thriving in the chaos of post-Gaddafi Libya and are opposed to the Cairo government.
Egypt has offered to train anti-militant, pro-government Libyan forces while it tries to contain the Sinai insurgency. Security officials say Egyptian warplanes flown by Libyan pilots recently bombed militant targets in Libya.
Thirty people were killed in the first attack in the al-Kharouba area northwest of al-Arish, near the Gaza Strip, the sources said. Military helicopters transferred the dead and wounded to Cairo. Among them were several senior officers from the Second Field Army based in Ismailia, security sources said.
The car bomb attack targetted two armoured vehicles at a checkpoint near an army installation, the sources said. They said the big explosion and high death toll were likely due to the vehicles being loaded with ammunition and heavy weapons.
Security officials gave conflicting accounts of the first attack, with one Sinai-based official saying a rocket-propelled grenade was used. More than 25 people were wounded.
Hours later, gunmen opened fire on a checkpoint in al-Arish, killing three members of the security forces, officials said.
The casualties were transported to Cairo by military helicopters, state news agency MENA reported.
There was no immediate claim of responsibility for either attack. Similar previous operations have been claimed by Egypt's most active militant group, Ansar Bayt al-Maqdis.
Though the vast peninsula has long been a security headache for Egypt and its neighbours, the removal of President Morsi of the Muslim Brotherhood brought the region new violence that has morphed into an Islamist insurgency
Security forces have been squaring off against militants who have killed hundreds of soldiers and police since the army toppled Morsi in July 2013 after mass protests against his rule.
Most attacks have been in Sinai, although militant groups have claimed responsibility over the past year for deadly bomb attacks on state installations in the Nile Delta and in Cairo.
The Brotherhood says it is peaceful and denies government claims it has links to the Sinai-based Islamist militants.
Sisi convened the National Defence Council on Friday evening for an emergency meeting in response to what his office called “a terrorist attack”.
Shortly after the second attack, Sinai residents reported that phone lines and Internet services had been cut.
Security sources said the communications shutdown coincided with the beginning of a military operation east of al-Arish in response to the attacks. Apache helicopters bombed areas south of the towns of Sheikh Zuwaid and Rafah, near the Gaza Strip, which sources said were believed to be “militant hideouts.”
MENA said armed forces were “conducting a large-scale combing operation” involving military helicopters and special forces troops, but gave no further details.
This is not the first time in the 16 months since Morsi's overthrow when news of a deadly attack against security forces in the Sinai has been swiftly followed by official announcements about a fresh assault on militants.
Washington provides Cairo with military aid of around $1.3 billion annually. A partial suspension of aid following Mursi's ouster was relaxed in April, when the US said it would deliver 10 Apache helicopters, which have not yet arrived in Egypt.
The Pentagon said at the time that aid would help Egypt's counter-terrorism operations in the Sinai.
Six soldiers were killed on Sunday by a roadside bomb southwest of al-Arish.
Security officials have expressed concern that Islamic State militants who control parts of Iraq and Syria have forged ties with radical Islamist groups in Egypt.