Though little noticed, the Islamic State recently tricked President Trump into believing it had attacked the Philippines.

It happened last Friday, when a gunman stormed into a popular casino in Manila, capital of the Philippines. The attacker set fire to tables before being shot by police.

But as news of the attack first became public, ISIS propagandists quickly claimed responsibility. Given an intelligence briefing on the attack, Trump then publicly referenced an act of terrorism.

Prior to doing so, Trump had probably asked his briefer what was going on. The briefer likely responded along the lines of "though it's early, we think this is ISIS.''

But it turns out this wasn't a terrorist attack. While more than 30 people were killed — apparently from a panic-induced stampede — the gunman was motivated by personal and not political concerns.

Still, Trump's assumption of responsibility deserves more than scorn, because the president is right to expect major ISIS attacks in the Philippines.

After all, the Philippines is currently battling ISIS-linked militants in Marawi city on its southern Mindanao island. And while Mindanao has long been a hotbed of violent Islamic extremism, the presence of ISIS and its success in gathering other jihadist groups under its banner speaks to a growing challenge.

The traditional Philippines Islamic terrorist group, Abu Sayyaf, is one such example.

Not so long ago, Abu Sayyaf was a criminal-terrorist entity known for its kidnapping, ransoming, and occasional beheading of hostages. But in 2014, major elements of Abu Sayyaf pledged fealty to ISIS leader Abu Bakr al-Baghdadi. Since then, they have acted in Baghdadi's name, seizing territory and attacking the government.

Abu Sayyaf is just one of many major terrorist groups that have pledged allegiance to ISIS over the past couple of years.

Moral questions aside, it's not hard to see why this is happening.

With its perceived success in seizing ground, resisting the west, killing those who reject its fanatical brand of Islam, and maintaining a territorial caliphate, ISIS has become the all-star (rather than jayvee) global terrorist team. It has offered a cause to losers like Orlando attacker Omar Mateen, and perceptions of an ordained mission to Salafi-Jihadist terrorist groups. At its heart, ISIS' invitation to prospective recruits and groups is the same: ''Like winning? Join us.''

To be sure, ISIS is a despicable group made up of a mix of malcontents, the mentally ill, and ideological fanatics.

But the ISIS brand appeal isn't just about killing. It's also about a life of terrorist luxury. For one, ISIS membership brings associated access to a wealthy donor base across the Islamic world.

Like any other investors, these terrorist financiers like to generate returns on their investments. They just measure their return in blood rather than money. And ISIS offers that return on investment. As such, those who wave the black flag get the weapons, supplies, and contacts that they need to pursue their particular agendas. Just today, the Philippines Army secured a vast stash of cash from a militant safe house in Marawi city.

There's a secondary point worth noting here: Flexibility. ISIS knows that the militants who pledge to it aren't totally buying into its message. In part, they are using ISIS for their own agendas. They know that ISIS is absolutely willing to tolerate local agendas like those currently in play in Marawi. For ISIS, that's a bargain deal if fighters swear allegiance to its leadership. Here we see the group's strategic flexibility. And the roots of how it intends to flourish over the long term.

We need to be aware that this is a global struggle with many different faces. Whatever Trump might say, however many ISIS fighters we kill or capture in Syria and Iraq, as long as the group has credibility, others will be ready to sign their names on the dotted line.