Two attacks in Egypt's Sinai Peninsula killed 33 security personnel on Friday, security sources said, in some of the worst anti-state violence since Islamist President Mohamed Mursi 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 targeted two armored 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 Mursi 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 Mursi 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.