JOACHIM LÖW, the manager of the German national football team, was unusually composed after his team threw away a two-nil lead over England in a friendly match on March 26th. “Thank God everything somehow went smoothly,” Mr Löw told German television afterwards. Like many Germans, the manager seemed less concerned about winning or losing than about terrorism. A German friendly against France was a focal point of the November 13th attacks in Paris, and a match against the Netherlands on November 17th was called off due to fears of a bomb. To date Europe’s growing problem of Islamist terrorism has left Germany almost entirely unharmed. The country’s only deaths at the hands of Muslim extremists have been two American servicemen gunned down by a Kosovar Albanian at Frankfurt’s airport in 2011. Some see this as evidence of superior intelligence and policing. After the September 11th attacks and the failure to detect the Nationalsozialistische Untergrund, a far-right terrorist group which killed ten people between 2000 and 2007, Germany’s federal and 16 state-level domestic intelligence services were repeatedly streamlined, leading to better information-sharing. Stephan Mayer, a security expert in the Christian Social Union party, says 11 attacks by radical Islamists have been thwarted since 2000. “This isn’t simply a matter of luck—it’s primarily about the good co-operation of the security services in our country,” Mr Mayer says. Others think the terrorists may be giving Germany a free ride for the moment. Experts briefed by the foreign intelligence service, the Bundesnachrichtendienst (BND), say it thinks Islamic State is yet to decide whether to attack Germany. The group may worry that an attack would prompt a crackdown that could make it more difficult to use the country as a transit route.

But no one expects the calm to last indefinitely. Hundreds of heavily armed police patrolled Berlin’s Olympic Stadium and other key points last weekend, proof of a growing skittishness. “London, Madrid, Paris, now Brussels—even German cities won’t be spared forever,” says Rainer Wendt, Germany’s police union boss.

Terrorist attacks elsewhere in Europe are gradually leading Germany to change its leery stance towards aggressive security and surveillance policies, rooted in its historical experiences of totalitarian Nazism and Communism. “A few years ago, I would still have called Germany a pacifist country,” said Karl-Heinz Kamp, president of the Federal Academy for Security Policy in Berlin. Recent crises “have made foreign-policy and security issues part of dinner-table conversation again”.

The government plans to spend an extra €2 billion ($2.3 billion) on internal security between 2017 and 2020, adding 3,000 officers to the over 30,000-strong federal police force. The BND and its domestic intelligence counterpart, the Bundesamt für Verfassungsschutz (BfV), will get an additional €30m in funding this year; their budgets have grown by half since 2010. After nine years of political and legal wrangling, Germany adopted data-retention rules in October. Last summer the country was in an uproar over its intelligence services’ sharing of data with American agencies; since the Brussels attacks Angela Merkel, the chancellor, has been calling for even more co-operation.

In fact Germany has as much reason to fear terrorism as Britain, Spain, France or Belgium. The BfV counts about 8,650 ultra-conservative Salafist Muslims in Germany. At least 800 young people have left to fight in Syria, of which around 260 have returned. In all, security services reckon about 500 potentially dangerous Islamist radicals live in the country.

A steady drumbeat of incidents has raised fears that something worse could be coming. Salah Abdeslam, a participant in the Paris attacks whose arrest seems to have touched off the March 22nd bombings in Brussels, reportedly met with collaborators in Ulm, a German city, in October. In February a teenage Salafist in Hanover stabbed a policeman in the neck. A resident of suburban Frankfurt with Salafist connections was arrested for allegedly planning to pipe-bomb a bicycle race. Social angst has risen accordingly. Between January 2015 and January 2016, the proportion of respondents worried about an attack on German soil rose from 45% to 68%, according to a survey by Infratest dimap, a pollster.

An attack in another country that was planned in Germany (like the September 11th attacks, which were hatched largely in Hamburg) could also cause political fallout. But the most worrying possibility would be a terrorist incident linked to the 1.2m mainly Middle Eastern refugees who have arrived in Germany since the start of 2015. The BfV warned in late February that it had received about 300 reports of jihadists among the migrants. The tips have generally proved to be duds. If one turns out to be live, the consequences could be dramatic. Germany’s refugee politics are already explosive enough.