The end of Ramadan is always eagerly anticipated. This year, for security officials in the Islamic world and the west, it cannot come fast enough.

Even before the start of the Muslim holy month two weeks ago, attacks claimed by Islamic State (Isis) were bringing death and destruction. On 22 May, a suicide bomber outside a pop concert in Manchester killed 22 people. The bloodiest attack in the UK for 12 years, it marked only the beginning of a wave of violence stretching across half the planet.

Since then, gunmen in Egypt have opened fire on a convoy of Coptic Christian pilgrims. In Nigeria, the Isis affiliate Boko Haram launched an attack on a regional capital in the country’s north-east. In the Philippines, the government fought hundreds of gunmen linked to Isis to regain control of a city. In Baghdad, Isis militants bombed families queuing for ice cream. In Kabul a truck bomb blamed on Isis killed 150. Three men killed eight people and injured more than 50 in the centre of London using a van and knives. Twelve died in a startling attack in Iran. In Australia and in Paris, there have been lone attackers claiming to be Isis members.

The intensity and scope of this onslaught surprised analysts and officials. Ramadan was favoured by Isis to launch attacks long before the group surged to global prominence. But since the group’s capture of swaths of territory in the core of the Middle East and its declaration of a new caliphate in 2014, the holy month has always seen an upsurge of violence.

This year, however, there is an added factor fuelling the strikes, experts say.

“Isis wants to survive as an organisation. It does not want to disappear when it loses territory … Top of the list of its strengths is external operations, so it needs to keep that going to attract donations, recruits and keep up the brand strength,” said Daveed Gartenstein-Ross, a Washington-based analyst.

Isis has denied that the current wave of attacks in the UK and Europe is linked to the series of military defeats it has suffered in its Middle Eastern strongholds over the last 18 months, saying it will recapture “every inch of territory lost” over the coming years.

The group has lost most of the towns it once held in Iraq and much of the city of Mosul. In Syria, an offensive against its headquarters in the provincial capital of Raqqa is under way.

In the most recent issue of its online magazine, Rumiyah (Rome), Isis said losing territory was “nothing new” and would lead only to “Isis regrouping … [and] rekindling the flames of war”.

The group has previously said it was forced “into the desert” between 2006 and 2011 but overcame the setback.

Many analysts believe recent victories over the group in Iraq and Syria may not be decisive.

Jean-Pierre Filiu, professor of Middle East studies at Sciences Po in Paris, said any supposed victory might be “pyrrhic” as there was “no credible Arab Sunni partner fighting alongside Kurdish and Shia forces which could control the ground with the support of local communities once it is taken”.

“Isis is very far from total defeat … Only two-thirds of Mosul is liberated. The battle for Raqqa will be long and dirty. And even afterwards it is a delusion that Isis will be eliminated,” Filiu said.

Many experts foresee Isis retaining scattered bases in Iraq and Syria from which it could launch – or at least organise and inspire – further terrorist attacks on the west, as well as violence across the Islamic world.

“The losses would limit capacity, but [terrorist planners] don’t need to control the territory, they just need a safe haven and there is no shortage of places in the world where they can find them,” said Gartenstein-Ross.

One powerful dynamic is the continuing rivalry with al-Qaida, the veteran group responsible for the 9/11 attacks. The recent bombing in Iran was motivated by sectarian hatred but also by a desire to further distinguish Isis from al-Qaida, which has never attacked the Shia-majority state.

Al-Qaida has consolidated a powerful presence in the Sahel, Yemen and Syria in recent years and recently called for so-called “lone wolf” attacks in the west. Its affiliate in Somalia has launched a series of attacks on local security forces in recent weeks.

Isis devoted much of the most recent edition of Rumiyah to east Asia.

“We have all focused on Isis because of the territorial gain … [But] Al-Qaida is still there … And more generally, this sort of ideology is still attractive and very effective … it has been growing for two decades at least and is still on the up in the Arab world, in Africa and in Asia,” said Richard Barrett, former head of counter-terrorism for MI6.