CAIRO - The scale of the bloodshed was vastly higher than past militant attacks but the Egyptian government response the same: three days of mourning, reassuring messages in the media that things are under control, and the president promising vengeance.
The identical pattern in the aftermath of Friday's attack on a mosque in Sinai, which killed 305 people, raises the question whether Egypt has any options left in the fight against Islamic militants.
The military has thrown tanks, fighting vehicles, fighter-jets, warships and helicopter gunships along with tens of thousands of security forces in three years of conflict with extremists, including an affiliate of the Islamic State group in the northern part of the Sinai Peninsula.
The area has been under emergency law for several years and the entire country since April. Security forces have forcibly evacuated areas adjacent to the border with Gaza, razing residents' houses and farmlands. They have blown up underground tunnels that authorities believe jihadis used to smuggle weapons and fighters in from neighbouring Gaza, ruled by the Palestinian militant group Hamas.
These measures have shown few tangible results.
The firepower and troop deployments in Sinai have kept militants from holding territory but have not prevented them from carrying out assassinations that terrorize the population and launching deadly attacks on military and police posts and convoys and recently a daylight robbery in Sinai's largest town.
In a televised address, a livid Abdel-Fattah el-Sissi, Egypt's general-turned-president, pledged the use of "brute force" in response to Friday's attack. "The armed forces and police will forcefully take revenge for our martyred sons and restore security and stability in the short period ahead," he vowed.
There is little public discussion of how to conduct the war and northern Sinai area is closed off to journalists, making it difficult to assess what's going on. In the overwhelmingly pro-government media, talk about the conflict is largely focused on cheering the military and police, commemorating their "martyrs" and urging the public to rally around el-Sissi.
The closest authorities came to admitting shortcomings was last month when el-Sissi removed the armed forces' chief of staff and top police generals after a planned attack on militants in the Western Desert went disastrously wrong. The operation left over a dozen counterterrorism police officers dead and exposed poorcoordination among security and intelligence agencies.
It also illustrated the problem posed by Egypt's long desert border with Libya — a country mired in chaos and rife with armed Islamic militant groups — through whichweapons and fighters can be smuggled. That has fueled a second front of militant violence in the west, with signs of arms movements to the Sinai extremists.
Egypt's response has been in line with a longstanding model of fighting a conventional war against an opposing army. Indeed, recent years have seen up to $15 billion in arms deals, largely for big-ticket items such as two helicopter carriers, submarines, assault helicopters and fighter jets.
But critics have called for a counterterrorism strategy in Sinai rather than the reliance on a conventional deployment of overwhelming force. There are some trained counterterrorism soldiers and police deployed, but most are poorly trained regular troops and police conscripts whose main skill is manning a checkpoint. Warplanes and attack helicoptershave limits in a rugged mountain terrain that the militants know far better than the military does. And forces moving with tanks and heavy vehicles are often ambushed by the more agile militants using light arms, machine-guns, roadside bombs and suicide bombers.
El-Sissi recently said security forces are hampered by the presence of civilians in Sinai, requiring extreme caution which benefits the insurgents. But critics say the military has been heavy-handed as is, deepening the distrust of local tribes who have long claimed discrimination.
Male family members are sometimes arrested if another member is suspected of militancy, according to Sinai rights activists. Soldiers and police at checkpoints are notorious for mistreating people, they say. Roads are often blocked and mobile phone services disrupted. Houses have been razed to clear zones for military control and people forcibly evacuated. Even those who oppose the militants become less likely to help security forces.
At the same time, the militants brutally intimidate residents from co-operating with security forces, kidnapping suspected collaborators and dumping their decapitated bodies on the streets of el-Arish, Rafah and other north Sinai towns for all to see.
So the locals provide the military with little actionable intelligence.
One suggestion has been for the military to arm local Sinai tribesmen hostile to the militants — like the Sunni Arab "Awakening" militias in Iraq that were created by the U.S. military and were a key part of defeating al-Qaida in the 2000s. Given the anger many tribesmen now feel after Friday's massacre, it's a scenario that is becoming less unthinkable.
The military, however, fears armed tribesmen could eventually turn against it.
Critics also contend the government's country-widecampaign against Islamists has pushed some young people toward the Islamic State group affiliate. The crackdown was launched against the Muslim Brotherhood in 2013 after the military ousted President Mohammed Morsi, a Brotherhood member. Since then, thousands of Brotherhood members and other Islamists have been jailed. There have been accounts of younger Islamists being radicalized, some in prison, and turning to IS support.
The government contends that the Brotherhood is a terrorist group, intertwined with militants from the start.
Some believe the militants are gambling as they turn ever more brutal, risking a revolt by the populace. Hassan Khalaf, a local tribal elder, said many of those killed were already co-operating with the army and that they were likely targeted as an intimidation tactic. "People are more determined now to stand against that inhuman and heartless bunch," he said.
Associated Press writer Maggie Michael contributed to this report from Ismailia, Egypt.