ASK some Germans how people should react to terrorism and most would probably agree with the historian Herfried Münkler that the best attitude is heroische Gelassenheit: heroic calmness. Let other countries declare wars on terrorism and near-permanent states of emergency, they say; Germany’s dark history has taught it not to over-react. Sceptics used to reply that talk was cheap coming from Germany, which had been spared major incidents of the sort that have struck America, France, Turkey and other countries. That changed in the space of one week this month, when Germany suffered four very different attacks.

First, on July 18th, an Afghan refugee stabbed and axed four passengers on a train and another on a platform. Four days later a German teenager of Iranian descent went on a rampage in a shopping centre in Munich (pictured), injuring more than 30 people and killing nine before shooting himself. Two days after that, a Syrian refugee hacked a pregnant woman to death with a machete—“relationship troubles”, the police said. Elsewhere that night another Syrian refugee tried to enter a concert with a backpack of explosives. When he was barred, he blew himself up, injuring 15 others.

Germans grew more jittery with each round of breaking news. There was a brief panic during the initial hours of the Munich rampage, as rumours spread on social media that three killers were on the loose rather than just one. Munich’s 2,300 police were inundated with 4,300 emergency calls, almost all of them false.

But Munich quickly recovered its poise. Under the hashtag #OffeneTuer (“#OpenDoor”), residents offered to accommodate anyone stranded for the night by the lock-down. Munich’s police spokesperson, Marcus da Gloria Martins, laboured tirelessly to sort fact from fiction. Mr da Gloria Martins, who wrote a thesis on crisis communication, ultimately became the country’s hero of the week. On a television talk show, he appealed to the audience and media: “Give us the chance to report facts. Don’t speculate, don’t copy from each other.” It was the biggest applause line of the night.

Most politicians heeded his advice, distinguishing carefully between the issues at play in different killings. The week’s worst disaster, in Munich, had nothing to do with Islamism. The 18-year-old gunman, David Ali Sonboly, had been bullied and suffered from depression, and had prepared his rampage for a year. He had read “Why Kids Kill” by Peter Langman, an American expert on school shootings. In 2015 he visited Winnenden, a town in Germany where a school mass shooting took place in 2009. He executed his attack on the fifth anniversary of the massacre by Anders Breivik on the Norwegian island of Utoya.

Mr Sonboly’s case opened many debates. He had played “Counter-Strike”, a violent computer game also favoured by other shooters. Should such games be banned? The consensus seemed to be no; that would curtail liberty and be unfair on the majority of players who never become violent. Should Germany deploy its army in domestic emergencies such as this? Some, including Bavaria’s interior minister, Joachim Herrmann, said yes. Others pointed to Germany’s Nazi-era history and remained wary.