As the Islamic State group loses territory in Iraq and Syria, one of its deadliest branches is struggling against Egypt's powerful army to maintain a foothold in the Sinai Peninsula.
The affiliate, known as Sinai Province, has waged a murky war in the north of the peninsula bordering Israel that has killed hundreds of soldiers and policemen.
It also claimed the bombing of a Russian airliner carrying holidaymakers from a south Sinai resort in October 2015 that killed all 224 people on board. Egypt's tourism has yet to recover.
But Sinai Province has been unable to seize population centres, with one attempt to occupy a town in 2015 ending with the military unleashing F-16 jets against the jihadists.
Instead the group has tried to keep up a steady war of attrition involving roadside bombings, sniper fire and checkpoint attacks such as the one on Thursday that killed eight soldiers.
The jihadists are increasingly encircled in the peninsula, with the military razing sections of a town bordering the Palestinian Gaza Strip to create a buffer zone and destroying tunnels there, while setting up checkpoints on routes out.
"The military's biggest success is that they have been able to contain the insurgency, by and large, to North Sinai," said Jantzen Garnett, an expert on the jihadists with the Navanti Group analytics company.
The army had been struggling to quash the insurgency that took off in 2013 after the military ousted Islamist president Mohamed Morsi, unleashing a bloody crackdown on his followers.
Three years into the insurgency, however, a decisive victory against the jihadists appears distant, as Thursday's attack suggests.
"The Egyptian army has made some short-term progress against (Sinai Province) over the past year but the militant group continues to adapt and this progress should not be construed as long-term success," Garnett said.
"The military upped up its presence in the Sinai following the July 1 attempt at taking over Sheikh Zuweid," analyst Mokhtar Awad said of the group's attempt to seize the north Sinai town in 2015.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)