Islamic State, losing territory and on the retreat in Iraq and Syria, has claimed credit for a surge in global attacks this summer, most of them in France and Germany.
The wave of attacks followed a call to strike against the West during the Islamic holy month of Ramadan in June and July, in an apparent shift in strategy by the jihadist group, which has been hammered by two years of US-led coalition air strikes and ground advances by local forces.
Instead of urging supporters to travel to its self-proclaimed caliphate, it encouraged them to act locally using any means available.
"If the tyrants close the door of migration in your faces, then open the door of jihad in theirs and turn their actions against them," said an audio clip purportedly from spokesman Abu Muhammad al-Adnani, referring to Western governments' efforts to keep foreign fighters from traveling to the join the group.
Radicalized followers have responded to that call repeatedly in the past two months, in countries part of the international coalition battling Islamic State, including shooting people at a Florida nightclub, running them over with a truck in the French Riviera, and hacking them with an axe on a train near Munich.
The perpetrators had varying degrees of connection to the Middle East-based jihadists. Some had tried to travel to Syria and were on the authorities' radar, while others displayed few outward signs of radicalism until their deadly acts.
"There's a growing understanding that the idea of the caliphate is dying and more and more the leadership is calling on foreign fighters not even to come to Iraq and Syria but to go elsewhere or to commit violence locally," said Max Abrahms, a professor at Northeastern University in Boston who studies extremist groups.
Looking ahead, security experts and officials in the Middle East and the West predict the military campaign against the group in Iraq and Syria will ultimately end its goal of establishing a caliphate but in doing so may lead to a sustained increase in militant attacks globally.
For more than a month, Islamic State supporters on social media have been encouraging would-be "lone wolf" attackers in the West to choose from methods ranging in sophistication from bombing and shooting to stabbing and assault.
"Pledge your allegiance in secret or in public to (Islamic State leader) Abu Bakr al-Baghdadi and each one of you will be a soldier of the caliphate, no different from those present in the Islamic State," said one supporter.
Claims of credit for recent attacks issued by Islamic State via Amaq news agency, which supports the jihadist group, referenced Adnani's appeal.
The attackers "carried out the operation in response to calls to target nationals of countries that are part of the coalition fighting Islamic State" in Iraq and Syria, said statements following four incidents in Europe this month.
In France, a Bastille Day truck attack killed 84 people in Nice and a raid on a church killed an elderly Catholic priest in Normandy; In Germany, an axe attack and a suicide bombing in Bavaria injured about 20 people in total.
Most of the assailants, in pre-recorded messages pledging allegiance to Islamic State and taking responsibility for the attacks, echoed Adnani's rhetoric and encouraged others to emulate them.
"Brothers, go out with a knife, whatever is needed, attack them, kill them en masse," said Abdel Malik Petitjean, one of two men who killed the priest in northern France last week.
"If you are unable to travel to the Levant (Syria), then fight the apostate armies in your country," 17-year-old Muhammad Riyad, the Afghan refugee who carried out the axe attack on a train in Bavaria earlier this month, urged other Muslims in a similar video.
'LIKELY TO GET WORSE'
As Islamic State is weakened militarily, it is trying to commit violence anywhere in the world, said Abrahms, including by claiming credit for acts even when they have only a tenuous link to the group.
"It's indiscriminate about who can be a soldier of the caliphate ... and it's indiscriminate about which attacks the group will claim as its own," he said.
In the last 18 months, the group has been pushed off a quarter of the lands it seized in Iraq and Syria in 2014, research firm IHS said this month; other estimates put losses closer to half.
Iraqi authorities have pledged to retake Mosul - the largest city still under the group's control - later this year, but the militants will likely maintain safe havens in remote desert areas and revert to more traditional insurgent techniques.
Islamic State's defeat is a longer way off in Syria, and it has established footholds in pockets of lawlessness or instability from Libya to Afghanistan to the Philippines.
FBI Director James Comey said this week he expected the eventual defeat of Islamic State could lead to an increase in attacks in the United States and Europe by drawing militants out of Syria in much the same way that al Qaeda came about from fighters who had been radicalized in Afghanistan in the 1980s.
Analysts including J.M. Berger, a fellow at George Washington University who researches Islamic State, have supported that prediction.
"Projecting strength through terrorist attacks is a factor in the recent violence, but down the road, when (Islamic State) supporters have nothing to lose, things are likely to get worse," he said.