LONDON — A terrorist hostage situation involving foreigners is incredibly rare, if not unprecedented, in Bangladesh. Friday night an organized attack unfolded in the capital city Dhaka, involving six gunmen and the deaths of seven or more of the twenty hostages taken.

According to families of the victims, the terrorists spared those who could recite the Quran but tortured those hostages who could not. Chillingly, by 11:00 p.m. the terrorists were said to be “done with the foreigners” in this way.

While the dead from the Istanbul attack are still being buried, ISIS has claimed responsibility for this latest atrocity in Bangladesh. As has become habit, Bangladesh’s government has cast doubt on this claim without offering another explanation.

This is no less than ISIS promised. In a statement made prior to the beginning of the month of Ramadan, ISIS spokesman Abu Mohammed al-Adnani incited his followers across the world to take advantage of the “blessings” of attacking in this holy month. Jordan, Lebanon, Yemen, Turkey and of course Orlando in the U.S.

Instead of marking these days by sacrificing food and other worldly desires, jihadists have stained the holy month in blood and the grisly sacrifice of humans.

They call it the “month of Jihad.” This myth is largely based on the historic precedent of the battle of Badr, the Prophet Muhammad’s first great military victory against his polytheist enemy, which occurred in Ramadan. It matters not to them that Badr was an unplanned, defensive war.

Whether the attack in Bangladesh was indeed ISIS matters only tactically. Before ISIS was ever conceived, jihadists from Hamas onwards have been declaring Ramadan a “month of Jihad” and escalating attacks. As with the murder of a 13 year old girl while she slept in her Israeli home, attacks in Ramadan have occurred before ISIS ever emerged, and will outlast ISIS as a group. What drives them is the global jihadist insurgency, for which ISIS is but the latest vanguard.

Back to Bangladesh, regardless of whether this attack was directed by ISIS, its competitor al-Qaeda, or inspired by any other jihadist group, there is a way to place this operation in a global and local context.

As Iraqi forces have defeated ISIS in their founding city and former stronghold of Fallujah, ISIS must prove to its followers everywhere that even though it is down, it is not out. The rise in attacks everywhere during Ramadan is one way of doing that, but so too will be continued high profile terrorist operations in the West. Expect more of those.

Such international factors provide a sense of existential purpose to jihadists and their global insurgency. But it is always local factors that supply the fuel to keep that global furnace burning.

Inside Bangladesh, Sheikha Hasina’s Awami League government has had a long history with Islamists. The blood feud between Hasina’s secular, autocratic Awami League and Bangladesh’s equivalent of the Muslim Brotherhood, Jamat-e-Islam, goes back to the country’s war of Independence against Pakistan in 1971.

So dangerous has this feud become, that in May this year Sheikha Hasina’s government hanged the 73-year-old leader of Jamat-e-Islam, Motiur Rahman Nizami. He was convicted and punished for a list of crimes harking back to the war of Independence. These included genocide, rape and torture.

Despite the outcry from human rights groups, Nizami has become the fifth opposition leader to be executed by Sheikha Hasina since December 2013. There obviously were crimes to answer here, but clearly there is also something of a convenient and bloody political purge underway by Sheikha Hasina.

And though both al-Qaeda and ISIS hate Jamat-e-Islami and its Muslim Brotherhood inspiration in Egypt for being not Muslim enough, they hate the secularists who kill them far more. Besides, the killing of the leader of the country’s oldest Islamist group is too good an opportunity to pass up. It provides perfect justification for the jihadist notion that secularists are at “war with Islam” everywhere, which is why Muslims must fight back. Call jihadists anything, but bad at propaganda they are not.

And it is exactly this ‘fight back’ that has inspired a long line of low-intensity jihadist murders in Bangladesh.

In 2013 an infamous “hit list” appeared naming 84 “atheist bloggers.” in other words secularists and freethinkers. By early 2016 more than 20 victims had been targeted in their homes and brutally hacked to death and in some cases beheaded, by extremists.

The victims have included atheists, secularists, literary freethinkers, intellectuals and gay rights activists. In other words, anyone deemed not Muslim enough by jihadists.

Despicably, instead of showing solidarity to the victims of what is undoubtedly political fallout from her own brutal political purge, Sheikha Hasina has indulged in victim-blaming by pandering to this not Muslim enough absurdity.

In May she commented, “I don't consider such writings as freethinking but filthy words. Why would anyone write such words? It's not at all acceptable if anyone writes against our prophet or other religions.”

It is against this backdrop that al-Qaeda and ISIS have both been claiming recent attacks in Bangladesh.

In September 2014 al-Qaeda chief Ayman al-Zawahiri announced the launch of al-Qaeda in the Indian Subcontinent. And ISIS magazine al-Dabiq has featured an article claiming the “Revival of Jihad in the Bengal.” Implausibly, Bangladeshi authorities deny that either exist in their country, but what they say matters little.

Long gone are the days when terrorist atrocities required central coordination and direction. Now, all they need is inspiration. The heady mix of a sense of purpose provided by the global jihadist insurgency blends with the local context that can whip up a frenzy to the point where disgusting terrorist attacks can seem like heroic deeds of resistance. And while we fascinate ourselves with the tactically relevant but strategically futile question of whether any given latest terrorist atrocity is by al-Qaeda, ISIS or a self-starter jihadist, more jihadists are inspired to act by the mere occurrence of another successful attack.

For roughly 90 years, Islamist ideologues have been building the appeal of theocracy among the Muslim grassroots. Theocracy, by definition, is an intolerant and violent political system.

Caught between secular autocrats whose primary instinct is to kill their way out of any problem, and Islamist theocrats who offer nothing but medieval barbarism as an alternative, Muslim liberal democratic free thinkers have always been the political scapegoat for both sides. Yet far from making that the focus of our efforts to form a long term solution, our attention span only extends as far as the latest jihadist group to emerge bearing a fancy name and a penchant for spectacular murder.