Egypt’s Sinai Peninsula, a wilderness of deserts and raw mountains about the size of West Virginia, is famed for its Biblical history, Bedouin tribal life, and Red Sea resorts. But, now that the Islamic State’s caliphate in Iraq and Syria has been destroyed, the Peninsula linking Africa and Asia is also gaining notoriety as the Middle East’s hottest frontline against jihadist groups, including ISIS, an Al Qaeda franchise, and smaller cells.

Since 2013, terrorism has increasingly disrupted life in Egypt, especially in the Sinai. The Egyptian hinterland has witnessed more than seventeen hundred attacks over the past four years, according to a tally by the Washington-based Tahrir Institute for Middle East Policy. The Sinai Province, the local ISIS affiliate, has claimed credit for some eight hundred of them. Lately, the attacks have been creeping closer to Cairo and targeting more civilians.

On Friday, the Muslim day of prayer, more than two dozen extremists carried out the deadliest terrorist attack in modern Egyptian history. The sophisticated raid—which involved unleashing bombs inside a Sufi mosque, then shooting from outside at worshippers as they fled—killed more than three hundred and injured dozens more in the remote northern town of Bir al-Abed. The toll of casualties surpassed that of the 2015 bombing of a Russian Metrojet plane, which disintegrated after flying out of a resort in southern Sinai, killing two hundred and twenty-four people.

The mosque attack is the latest of many challenges facing President Abdel Fattah El-Sisi, a former field marshal, as Egypt heads toward elections next year. For all his military acumen, Sisi has been unable to protect his own people—or even his security forces. Almost a thousand police officers and soldiers have been killed while fighting extremists and insurgents in the past four years. And, despite his cult-like status—his face is on candy wrappers, T-shirts, and billboards—Sisi has solved few of the problems that sparked Egypt’s chapter of the Arab Spring uprising, in 2011.

Last year, Adel Abdel Ghafar warned in a Brookings Institution report that, “in a classic authoritarian bargain,” Sisi came to power “promising security, stability, and economic prosperity in exchange for near-total political control. Now, that bargain is in the process of breaking down, since he’s failed to deliver on all three fronts.” Unemployment among Egyptian youth, who have been the jihadi foot soldiers, is above thirty per cent—“a ticking time bomb,” Ghafar said.

Politically, Sisi’s regime has become increasingly autocratic. Although President Donald Trump is a close ally, the State Department’s latest human-rights report nonetheless criticized the Egyptian government for “excessive use of force by security forces, deficiencies in due process, and the suppression of civil liberties. Excessive use of force included unlawful killings and torture.”

Cairo has effectively banned anti-government protests, tortured detainees, repressed freedom of expression, and discriminated against Egypt’s minority Christians, Human Rights Watch reported this year. “Prosecutions, travel bans and asset freezes against human rights defenders, in addition to repressive new legislation, threaten to effectively eradicate independent civil society. The government denies workers the right to organize independent unions and prosecutes those who participate in strikes,” the organization said.

Internal tensions have played out most visibly in the Sinai, where tribes have long felt marginalized politically, economically, and socially from the central government in Cairo and its Nile culture. Some in the Sinai are reportedly even nostalgic about Israel’s occupation, between the 1967 war and the return of the Sinai to Egypt, in 1982, as part of the Camp David peace process. A campaign for greater tribal autonomy has now turned into an insurgency. In the first quarter of 2017, the Tahrir Institute recorded more than a hundred and thirty attacks in northern Sinai. Many areas are now closed military zones, where the residents live under curfew.

Sisi’s strategy echoes the West’s approach to extremism—jail, shoot, bomb, or kill its adherents, and hope that their ideology is obliterated or discredited in the process. Like the military leaders who preceded him in the Egyptian Presidency, Sisi has channelled much of the foreign assistance he receives—including large chunks of U.S. aid—into his security apparatus. Egypt has also bought submarines and fighter jets, which are of limited use against bands of extremists. The remedy to extremism is rarely brute force alone.

In 2014, Egypt declared a state of emergency in the Sinai. (It was extended to the entire country last April.) In a crackdown criticized by local and international human-rights groups, border areas have been cleared. Houses, and sometimes entire villages, have been razed. Tunnels, which support the commercial smuggling for which the Sinai is famous, have been destroyed.

“In North Sinai, the military has committed serious abuses, likely including extrajudicial killings, in its campaign against an affiliate of the extremist group Islamic State, whose fighters have targeted suspected civilian collaborators and Christians for death,” Human Rights Watch said. The Egyptian military claims to have killed some three thousand jihadis in the Sinai.

Yet the violence only escalates. The Sinai jihadis have become ever more brazen and aggressive in terrorizing the local population. The attack on the Sufi mosque is an example. Over the past five years, extremists in the Sinai largely targeted security forces. Now jihadists are attacking Sufis, whom fanatic Sunnis consider heretics.

What started as a local insurgency over autonomy has escalated into a challenge to the Egyptian state and its leader, with implications for neighboring Israel and the Palestinian Authority, to the east; chaotic Libya, to the west; and Europe, to the north. A report on ISIS’s Sinai Province by the Woodrow Wilson Center claims that “foreign fighters—largely from Libya, the Maghreb and Europe—have migrated to the Sinai, where they constituted as much as eighty percent of the Sinai Province’s fighting force by mid-2017.”

On Monday, Charles Lister, an expert on jihadism at the Middle East Institute, wrote that Egypt’s heavy firepower may have prevented ISIS from controlling territory, “but this scorched earth strategy has also caused widespread civilian displacement and a further deterioration of living conditions in the Sinai.” Lister continued, “ISIS may not exist because of such misplaced military tactics, but it certainly will not cease to exist because of them either.”

Egypt’s situation is reminiscent of the U.S. experience in Iraq and Afghanistan. Egyptian forces hold military bases, operate checkpoints, and carry out periodic patrols in armored convoys—but they can’t control much of the countryside. Sisi may reign as the most powerful strongman among the rulers of the more than twenty Arab countries. But his strategy in Sinai, so far, is not working.