Mr. Hataman, who travels by armored convoy, expressed worry that if the bombing raids intensify in Jolo, militants will slip undetected into Basilan via small boats. Already, they travel among Indonesia, Malaysia and the Philippines over poorly patrolled seas.

“One problem goes away and another starts,” Mr. Hataman said.

Interior Secretary Eduardo Año has blamed the Jolo attack on an Indonesian couple, although Indonesian investigators say there is little evidence.

Colonel Besana acknowledged that a number of foreign fighters were hiding in the Jolo hills, under the command of Hatib Hajan Sawadjaan, who is believed to have replaced Mr. Hapilon as the regional Islamic State emir.

The Islamic State’s lure seems never far from the surface in the southern Philippines. At a government ceremony in Basilan where houses were awarded to former Abu Sayyaf rebels under a long-gestating peace deal to bring autonomy to the Muslim south, security was so heavy that they were outnumbered by Philippine soldiers.

Jem Habing, 22, a former Abu Sayyaf fighter who said he had joined at age 11, like many children in his village, seemed noncommittal when asked if he might rejoin.

“They convinced me that if you die in battle, you will be rewarded in the hereafter,” he said. “They said it was the right path.”