Germany is reeling from a series of four violent attacks in a week in its south.
Ten people have been killed and dozens more injured in separate gun, bomb, axe and machete attacks. Three were in Bavaria and one in Baden-Wuerttemberg.
The authorities say they were not linked – but do they herald a new era of insecurity for the country?
On 18 July, a teenage Afghan refugee hacked at passengers on a train in Wuerzburg with an axe and knife, wounding five. He was shot dead by police.
On 22 July, a German teenager of Iranian heritage shot dead nine people in Munich before shooting himself dead.
On 24 July, a 21-year-old Syrian refugee killed a woman with a machete and wounded five other people as he fled before being arrested.
Later that day, a 27-year-old Syrian whose refugee application had been refused blew himself up outside a bar in Ansbach. Fifteen people were wounded.
The attack in Wurzburg has been claimed by so-called Islamic State (IS) while the Ansbach bomber had videos on his phone showing him pledging allegiance to the group, Bavaria’s interior minister said.
The attacker’s bomb was packed with metal fragments and he had been attempting to gain entry to a music festival which more than 2,000 people were attending.
However, police have ruled out a political motive for the killings in Munich.
Gunman Iranian David Ali Sonboly was inspired by other mass shootings that had no political motivation, such as a school massacre carried out by 17-year-old Tim Kretschmer in Baden-Wuerttemberg in 2009.
Sonboly carried out his attack on the fifth anniversary of the 77 murders by far-right extremist Anders Behring Breivik in Norway.
Investigators in Reutlingen said the Syrian machete attacker knew his victim and the attack was probably to do with their relationship.
German government spokeswoman Ulrike Demmer said the attacks were not connected and did not show a “consistent pattern”.
But Raffaello Pantucci from the Royal United Services Institute (RUSI) says the first attacks may have influenced what was to follow.
“Was the Ansbach bomber waiting for the right moment because all these other things were happening? It would not surprise me to find out that some activity was accelerated,” he said.
Sonboly had a history of mental illness. He had spent two months as an inpatient at a mental care facility in 2015, was depressed and feared contact with others, the Munich prosecutor’s office said.
The suicide bomber in Ansbach had also spent time living in a mental care facility and had twice attempted to take his own life, officials said.
In Reutlingen, the attacker also showed signs of being mentally disturbed.
He was also already known to police for assault, theft and drugs offences, police said.
The big influx of refugees to Germany was already controversial, so the fact that three of the attackers arrived as refugees is likely to sharpen criticism further.
The German government has already attempted to deflect this, saying the risk of someone being a perpetrator of terrorism is not greater among refugees than among the general population.
“Most of the terrorists who committed attacks in Europe in the past months were not refugees,” said Ms Demmer.
However, there were likely to be a few individuals with “psychopathic tendencies” as well as links to criminal and terror networks among such a large group of people, Mr Pantucci said.
Germany has not yet suffered a massive terrorist attack of the type seen in Paris and Nice – but that does not mean it is not a target, Mr Pantucci says.
Returning jihadists are known to have told investigators that the IS group was keen to recruit in Germany and the UK to boost its ability to carry out attacks in those countries.
“Their networks in these countries are not as close to criminal networks or as substantial as in francophone countries such as France and Belgium,” he says.
“Most Muslims in Germany are of Turkish origin and while there are Turkish jihadists present, it is more of an Arab story and has deeper roots in France and Belgium.”
The country has different police and intelligence agencies for each region as well as federal agencies and this bureaucratic layering could allow plots to “slip through” if intelligence is not shared effectively, Mr Pantucci says.
A review of French intelligence has already found that attacks there could have been prevented if different forces and agencies had communicated with one another.
Efforts to disrupt plots could also be hobbled because of German legislation preventing agencies from eavesdropping on citizens in the same way as their counterparts in the UK and US routinely do, Mr Pantucci says.
The German government is currently attempting to broaden the scope of the intelligence service, the Bundesnachrichtendienst, to collect data, but a proposed new law has not yet been passed.