The increasingly serious Islamic State insurrection in the southern Philippine city of Marawi is creating some strange alliances.

Over the weekend, Philippine President Rodrigo Duterte asked several Muslim separatist and Communist groups to fight alongside government troops against the Islamic State. The groups have not yet agreed to a formal alliance, but they have reportedly exchanged gunfire with ISIS militants.

GMA News reports that Duterte asked for assistance from the Moro Islamic Liberation Front, the Moro National Liberation Front, and the New People’s Army on Saturday. “Moro” is a term for the Filipino Muslim minority in the southern Philippines. Both of the Moro groups are separatist organizations seeking an independent state for Muslims. The MILF is a more aggressively Islamic spinoff from the nationalist MNLF.

The New People’s Army is the armed militant wing of the Communist Party of the Philippines. Unlike the Moro groups, the New People’s Army has been formally designated a terrorist organization by the United States, but the Philippine government removed its terrorist designation in 2011 while conducting negotiations with the banned Communist Party.

GMA cites a report that when members of the ISIS-linked Maute terrorist group “arrived at one barangay in Marawi City on Thursday with the goal of bombing the bridge to prevent government troops from advancing,” they came under fire from angry “residents and MILF members” and were forced to retreat. (A “bangaray” is a small administrative district, like a village or suburb).

The possibility of conflict between ISIS and the MILF was foreseen years ago, when another Moro offshoot, the Bangsamoro Islamic Freedom Fighters, splintered off from the MILF and swore fealty to the Islamic State.

The MILF broke away from the MNLF because the mother group was not Islamic enough; the BIFF broke from the MILF because it did not embrace strict Wahhabi Islam and seek to impose sharia law. When the MILF entered peace talks with the Philippine government, the BIFF conducted terrorist attacks designed to undermine them. The BIFF included some beheading enthusiasts even before it swore allegiance to ISIS, along with the better-known and infamously brutal Abu Sayyaf insurgents.

In January 2016, the MILF created a “task force” to counteract the disturbingly effective recruiting tactics of the Islamic State. MILF leaders feared many Muslims in the southern Philippines were disenchanted with the more moderate Moro groups and their preference for negotiating with the central government, gravitating to BIFF and ISIS because they promised violent action and unflagging resistance.

In an interesting side note, the Philippine military in early 2016 denied there was any conclusive evidence that ISIS was infiltrating the southern island of Mindanao or planning major terrorist attacks. The mayor of Davao City, the largest city on Mindanao, warned that ISIS groups were growing in size and contemplating major actions. That mayor was Rodrigo Duterte, who is now the president, and felt it necessary to declare martial law over Mindanao last week to combat the Islamic State attack on Marawi.

Duterte met with Moro Islamic Liberation Front chairman Al Haj Murad Ebrahim in Davao City on Monday to discuss military cooperation against the Islamic State in Marawi City, and in distributing humanitarian assistance to civilians in the area. Part of the deal includes expedited movement on the “Bangsamoro Basic Law,” which would establish an autonomous region for Muslim Mindanao.

Duterte made a public offer to MILF fighters that they would receive the “same pay, same privileges” as government soldiers if they joined the campaign against ISIS.

“And I will build houses for you in some areas,” the president added.