IT DID not take long for Islamic State (IS) to claim responsibility for a bomb on the island of Basilan, part of the southern region of Mindanao in the Philippines, that killed nine soldiers and civilian bystanders, along with the driver of the van the bomb was carried in. The army suspects the work of Abu Sayyaf, a brutal kidnapping-for-ransom gang from Basilan and the neighbouring island of Jolo which these days claims allegiance to IS.

The attack, on July 31st, highlighted the dangers of dragging out a slow, stumbling peace process that had made a leap forward just days before, when President Rodrigo Duterte enacted the Bangsamoro Organic Law. The law is key to ending half a century of rebellion by Filipino Muslim separatists in Mindanao which has cost tens of thousands of lives. It is surely key, too, to ending the chaos in which jihadists such as IS thrive.

Congress in Manila, the capital, had taken years to pass the new law, which provides for greater autonomy for the homeland of the Bangsamoro, Muslims who are in a majority in their part of Mindanao (which is predominantly Christian, like the country). In return, the main rebel group, the Moro Islamic Liberation Front (MILF), has dropped its demand for Bangsamoro independence. Greater autonomy was promised in a peace agreement signed by the government with the MILF in 2014.

The armed campaign for Bangsamoro independence began in 1969. The 2014 agreement was the culmination of decades of on-and-off negotiations between the government and Muslim separatist rebels, first the Moro National Liberation Front and then its less secular offshoot, the MILF. During those years, war-torn, impoverished Mindanao spawned a plethora of armed groups: some Muslim separatists, some communists, some simply violent criminals. Jihadists took advantage of the general lawlessness to recruit fighters to their cause.