Egypt’s military said it was in control of the Sinai peninsula after beating back the fiercest assault yet by Islamist militants behind a week of violence that has laid bare the growing threat facing the nation.
The day-long battle between security forces and Islamic State-linked militants on Wednesday left 17 soldiers and more than 100 jihadists dead, the military said. Officials in Sinai had earlier said as many as 64 security personnel were killed.
“No one, whoever he is, will be able to control even one millimeter of Sinai or any part of Egypt while the Egyptian army and Egyptian police exist,” military spokesman Brigadier General Mohamed Samir said, adding that speculative reporting was to blame for the widely varying casualty tolls.
The ferocity and breadth of the militant attack, though, refocused attention on security in the Arab world’s most populous nation where President Abdel-Fattah El-Sisi is attempting to build on signs of economic recovery after four years of turmoil. The main share index closed 0.7 percent lower, extending losses for the year to nearly 7 percent.
El-Sisi’s “whole thesis is establishing some sort of normalcy in the domestic and security situation,” Crispin Hawes, managing director of research company Teneo Intelligence, said by phone from London. The latest attacks “damage both” notions, he said.
Violence has escalated since El-Sisi led the army’s ouster of Islamist President Mohamed Mursi in 2013, and then began a crackdown on his Muslim Brotherhood supporters. Hundreds of the group’s members have been killed and thousands, including Mursi, put on trial. The government has accused the organization of carrying out attacks, a charge it denies.
The stakes are high for Egypt, and the president.
The government garnered pledges worth billions of dollars at a March investment summit and has unveiled ambitious development projects including a new capital city. In about a month, it’s due to open a new Suez Canal.
The economy is set to expand 5 percent in the fiscal year to next June, up from an estimated 4.2 percent, driven by about $10 billion in foreign direct investment and aid from Gulf allies. Faster growth and a pick up in tax revenue could help trim the budget deficit to 8.9 percent from 10.8 percent, according to finance ministry calculations.
To reach those goals, El-Sisi needs to restore security.
Attacks such as the blitz in Sinai, which involved rockets, mortars, scores of jihadi fighters and car bombs, expose how difficult that will be. Northern Sinai largely remains a no-go zone, with more than a year of escalating militant strikes prompting an intensified military campaign.
“The Sinai has bedeviled Egyptian rulers from Mubarak to Mursi, and now Sisi, yet the recent escalation is unprecedented,” New York-based security firm Soufan Group said in an e-mailed report. “The change in tactics -- going from hit-and-run to hit-and-hit-again -- bodes poorly for the area and Egypt at large.
‘‘Any hope that the group has simply adopted the Islamic State’s name, but not its lethality and ambition, was put to rest yesterday,’’ it said, referring to the Islamic State affiliate, known as Sinai Province, which claimed the attacks.
The violence has spread beyond the peninsula. The assassination of Prosecutor General Hisham Barakat this week -- a day before the second anniversary of the uprising that led to the military’s removal of Mursi -- demonstrated the reach of the militants.
To combat the rising violence and ensure what El-Sisi argued would be swifter justice, the government has drafted legislation that increases penalties for a range of crimes, including financing or supporting terrorism.
In lockstep, the crackdown has continued. Police raided a Cairo apartment killing nine Brotherhood members on Wednesday, prompting the now-banned organization to openly call for ‘‘rebellion’’ against El-Sisi’s administration.
The state-run Al-Akhbar newspaper on Thursday published a series of pictures of dead militants taken from the military spokesman’s Facebook page. Its headline summed up a growing sense of outrage over the the violence.
‘‘Revenge,” it read.