Islamic State's Egypt wing claimed a series of attacks that killed at least 27 security personnel on Thursday in some of the worst anti-government violence in months, after commemorations around the anniversary of the 2011 uprising turned deadly in the past week.
Egypt's government faces an Islamist insurgency based in Sinai and growing discontent with what critics perceive as heavy-handed security tactics.
A series of tweets from the Sinai Province's Twitter account claimed responsibility for each of the four attacks that took place in North Sinai and Suez provinces within hours of one another on Thursday night.
Ansar Bayt al-Maqdis, Egypt's most active militant group, changed its name to Sinai Province last year after swearing allegiance to Islamic State, the hardline Sunni militant group that has seized swathes of Iraq and Syria, drawing U.S.-led airstrikes.
Thursday's first attack was a bombing targeting a military headquarters, base and hotel in the capital of North Sinai province that killed 25 and wounded at least 58, including nine civilians, security and medical sources said.
The flagship government newspaper, al-Ahram, said its office in the city of Al-Arish, which is situated opposite the military buildings, had been "completely destroyed," although it was not clear if it had been a target.
Later, suspected militants killed an army major and wounded six others at a checkpoint in Rafah, followed by a roadside bomb in Suez city that killed a police officer, and an assault on a checkpoint south of Al-Arish that wounded four soldiers, security sources said.
After Sinai Province's claim of responsibility, security sources said a suspected militant had been killed while attempting to plant a bomb at a power transformer in Port Said.
Sinai-based militants have killed hundreds of security officers since President Mohamed Mursi of the Muslim Brotherhood was removed from power following mass protests against his rule.
The military said in a statement on its Facebook page that the attacks were the result of a successful campaign to pressure the militants.
The U.S. State Department condemned the attack, saying in a statement: "The United States remains steadfast in its support of the Egyptian government’s efforts to combat the threat of terrorism in Egypt as part of our continuing commitment to the strategic partnership between our two countries."
The violence and civil unrest comes as Egypt is trying to burnish its image in the run-up to an investor's summit in mid-March, to be followed by parliamentary elections.
The attacks in Al-Arish and Rafah continue a pattern of unrest in the remote but strategic Sinai Peninsula, which borders the Gaza Strip, Israel and Egypt's Suez Canal.
But the less common attempts in Port Said and Suez, at opposite ends of the Canal, bring the insurgency nearer to a key source of hard currency for the cash-strapped state.
Income from the canal has not been hurt by the turmoil following the 2011 uprising to the same extent as foreign investment and tourism, and a planned second canal is meant to boost the waterway's value to Egypt.
However, Egypt's attempts to attract investors for mega-projects, such as the second canal, that the government says are key to securing a nascent recovery could stall if instability increases.
The last major attacks in Egypt were on Oct. 24, when militants killed at least 33 members of the security forces. That operation was also claimed by Sinai Province.
That prompted the government to declare a state of emergency in parts of Sinai, allow civilians to be tried in military courts, close the border with Gaza, and begin building a kilometre-wide buffer zone abutting the Palestinian enclave.
Tensions have risen across Egypt in the past week with protests, some of them violent, marking four years since the uprising that ousted veteran autocrat Hosni Mubarak from power.
Earlier on Thursday, a group of women protested in Cairo over the death of activist Shaimaa Sabbagh and around 25 others said to have been killed by security forces at rallies commemorating the 2011 uprising.
Sabbagh, 32, died on Saturday as riot police were breaking up a small, peaceful demonstration. Friends said she had been shot, and images of her bleeding body rippled out across social media, sparking outrage and condemnation.
"The Interior Ministry are thugs!" chanted about 100 female protesters at the site of Sabbagh's death. Some held up signs with the word "murderer" scrawled over the face of Interior Minister Mohamed Ibrahim.
The protesters were defying a law that severely restricts protests. "People are here at incredible risk to themselves. But it's a way of standing against the fear they have instilled," said activist Yasmin el-Rifae.
Ibrahim has said an investigation into Sabbagh's death will lead to prosecution if any member of the security forces is found responsible.
One of the organizers of Thursday's demonstration said they had asked only women to attend because they feared infiltration by plainclothes male agents.
Across the street from the protesters, beside police officers, men stood making lewd gestures and yelling profanities. Others chanted in favor of President Abdel Fattah al-Sisi.
Criticism is growing of the security tactics Sisi has used since Mursi was ousted.
A crackdown that began with the deaths of hundreds of Brotherhood supporters and the imprisonment of thousands more has expanded to include liberals and other activists.
Some of those now opposed to the government initially supported the protests that led to Mursi's removal and Sisi's rise to power, as people who knew Sabbagh said she had.