Philippine troops killed two bomb couriers at an army checkpoint on Wednesday before they could detonate the explosives in a crowded area in the restive south, military officials said.
One of the two local militants fired at soldiers who flagged them down at a checkpoint on Wednesday, sparking a brief gun battle in M'lang town in North Cotabato province, said Brig Cirilito Sobejana.
Troops have been put on alert for possible retaliation by militants.
Police defused a bomb made from a 60mm mortar round that was carried by the couriers, along with a pistol and a mobile phone, which was to be used to remotely detonate the explosive, Brig Sobejana said.
The two belonged to Bangsamoro Islamic Freedom Fighters, one of a number of small armed groups aligned with ISIS that have turned to bombings to raise their profile and show they are a force to reckon, despite battle setbacks, he said.
"They're running low on logistics and ammunition and cannot fight our troops face-to-face, so they're resorting to these IED emplacements to cause public alarm and send the message that they still exist," Brig Sobejana said by telephone.
Last week, a bomb-laden van driven by a suspected militant exploded killing 11 people, including a soldier, five militiamen and the driver, in a brazen attack near an army militia outpost in Lamitan city on southern Basilan island.
Militiamen, who had been alerted about possible bombings, stopped the van at a checkpoint in Colonia village, where the bomb went off, military officials said.
ISIS, through its media arm, claimed responsibility for the attack, and said the attacker was a Moroccan.
Government forces have been on alert in the south, scene of decades-long Muslim separatist unrest, after President Rodrigo Duterte signed a new autonomy agreement last week with the biggest Muslim rebel group.
The peace deal has been opposed by much smaller but violent extremist bands, such as the Abu Sayyaf and others, which have associated themselves with ISIS.