Just last month, Islamist extremists were driven out of their last stronghold deep in the Syrian desert. Amid much relief, the probability of Islamic State’s ‘caliphate’ seemed over as its infamous black flags were ground into the earth by government soldiers.

Having once controlled a mini-state the size of the UK, IS had been run out of town, left with only a few isolated desert villages.

Nevertheless, one of its leaders, Abu Bakr al-Baghdadi, is still at large and the fate of tens of thousands of his acolytes is unclear. Those who have not been killed or captured in Iraq and Syria have dispersed to their countries of origin. But even in its reduced form, Islamic State still attracts fanatics who are easy to sustain and guide using encrypted communications and social media.

Leader of the Islamic State group, Abu Bakr al-Baghdadi, delivering a sermon at a mosque in Iraq during his first public appearance

Their ranks include 32 Sri Lankan extremists known to have joined IS in the Middle East. It has had a ‘presence’ in more than 40 other countries – often returned foreign fighters, some camouflaged as refugees.

These men have been responsible for repeatedly attempting to blow up commercial aircraft, and for attacks on churches and tourist centres. Usually they offer their expertise in bombing to bolster home-grown terror groups.

Sri Lanka has a small Islamist cell called National Thowheed Jamaath, mainly known for vandalising Buddhist statues with sledgehammers. Yesterday, Sri Lankan officials said the group carried out the bombings with help from international militants.

Seven suicide bombers killed at least 290 people in coordinated attacks on five-star hotels and churches on Easter Sunday. Pictured: the interior of St Sebastian's church in Negombo

A crime scene official inspects the site of a bomb blast inside a church in Negombo, Sri Lanka, which lost half its roof tiles with the force of the blast

Terrorists know very well that for nations such as Sri Lanka, Egypt, Kenya or Turkey, this can be devastating to the economy as tourists are scared off. If the threat of attacks destabilises a hated national government, or reduces the amount of ‘unwholesome’ Western habits such as drinking alcohol or wearing skimpy swimsuits, so much the better.

This kind of attack has become more common since an increase in airport security had made secreting bombs on planes much more difficult, instead targeting hotels, churches and beaches.

Over the years we have witnessed attacks in Bali in 2002, killing 200 holidaymakers, and again in 2005. A further 174 people died when Pakistani-inspired terrorists hit India’s Mumbai in 2008, including the Taj Mahal Palace Hotel and the Oberoi Trident.

Sri Lankan soldiers secure the area around St. Anthony's Shrine after a blast in Colombo. A van exploded near where dozens of people died the previous day

Sri Lankan Police officers inspects a blast spot at the Shangri-la hotel in Colombo a day after a bomb ripped through the building on Easter Sunday

There have been attacks, too, in Egypt. In 2015, 224 Russian tourists were killed by a bomb on a return flight from Sharm to St Petersburg.

In view of this litany of attacks on tourists, where is safe?

The most dangerous places are those countries where a neighbouring state is a refuge for armed militant groups. This includes Kenya, with the al-Shabaab militant group who have a base in neighbouring Somalia, and India, with Pakistan which is home to an array of fanatic groups who, in turn, take their orders from seriously nasty people active in Afghanistan.

Alex (left) and Anita (second left) were killed in the blast. Ben Nicholson (right) is reported to be in 'complete shock' having received minor injuries

Povlsen, 46, and Anne Storm Pedersen, pictured together left, met when Anne began working in sales for Bestseller. Brit Alex Nicholson, 11, was killed with his mother Anita, 42, pictured together right, as they ate breakfast in the Shangri La in Colombo

Holidaymakers are therefore well-advised to think twice about going to Egypt, Morocco or Tunisia – the source of the largest foreign contingent in IS despite being a successful democracy which emerged from the Arab Spring.

The riskiest places for soft target attacks are Indonesia, Malaysia and the Philippines, where Al Qaeda and IS simply have to add their malign expertise to pre-existing militant Islamist cells to cause carnage.

Yet most people register these attacks – but factor them into their holiday plans and travel regardless.

Despite 67,000 murders in Brazil and 29,000 in Mexico last year, both countries still attract healthy numbers of foreign tourists. Of course, visitors are not targeted in such crime – most often drug-related – but the chance of being slain in the crossfire is pretty high, as is the threat of kidnap for ransom.

Blood stains are seen on the wall and on a Jesus Christ statue at the St. Sebastian's Church after blast in Negombo, north of Colombo, Sri Lanka,after the bombing

Having lost more than 20,000 fighters as a result of US, French and Russian airstrikes, IS leaders are now reliant on Plan B: bringing terrorism to the streets of civilised countries.

Increasingly, this is their only tactic now that they have lost their dream of a caliphate in the last pocket of territory in Syria they controlled.

So, if IS was the inspiration for the Sri Lankan bloodbath, which is increasingly likely, the sad truth is that it will surely not be the last of its kind.

As Defence Secretary Gavin Williamson said after IS’s rout from its former stronghold in Syria just a few weeks ago: ‘We cannot be complacent. They’ve dispersed, and they’ll continue to pose a threat to Britain, and that is why we will remain vigilant.’

Michael Burleigh is author of Blood And Rage: A Cultural History Of Terrorism