IN JANUARY A food bank in Essen, an industrial city in western Germany, unwittingly caused a political storm by requiring each new claimant to present a German identity document. Three-quarters of users were foreign, explained Jörg Sartor, the food bank’s boss; surely that was unfair to locals. First came protesters who daubed “racist” on his vans. Then the far-right Alternative for Germany (AfD) party threw its (unsolicited) support behind him. Cameramen and reporters arrived. Other politicians waded in on all sides. Even Angela Merkel gave her verdict: it was “not good” that Mr Sartor had chosen to distinguish between Germans and others. In early April he lifted the ban on foreign users.

The incident reflects a widespread feeling of what Mrs Merkel has called Unbehagen, not easily translated but meaning anxiety or unease. A country that long equated belonging with having four grandparents with German names, and treated many immigrants as temporary visitors, has seen a massive influx of foreigners following the chancellor’s decision in 2015 to keep borders open to refugees and asylum-seekers. At the same time Germany’s traditionally egalitarian “social market economy” is becoming more polarised as globalisation buffets old industrial centres like Essen; hence the food banks.

Speaking at a conference of her Christian Democrat (CDU) party in Berlin in February, Mrs Merkel argued that this had affected the German election on September 24th last year in three ways: voters felt Unbehagen about the state’s ability to cope with crises like the massive influx of refugees; about the country’s economic future; and about the state of the wider world. That was a fair summary of the mood in the country she has run for more than 12 years.

The chancellor was trying to explain why her centre-right Christian Democratic Party and its Bavarian partner, the Christian Social Union (CSU), had suffered a drop in their share of the vote to a post-war low of 33%. Her partners in the grand coalition that has run the country for eight of her 12 years in power, the centre-left Social Democrats (SPD), also saw their support fall, from 26% to 21%. The anti-immigration AfD, formed only in 2013, took third place with 13%. An unprecedented five months of coalition wrangling to form a government ended only on March 4th when SPD members voted to support a new grand coalition with the CDU/CSU.

Herfried and Marina Münkler, a pair of academics and writers, capture the mood of today’s Germany in their book “The New Germans”. Ostensibly a profile of the hundreds of thousands of newcomers, their account makes a wider argument: even ordinary Germans without migrant roots are changing. “The order of the static” in Germany, the Münklers argue, is giving way to more fluid relations and “an end to stark national borders”, exposing the country to economic, social and technological changes abroad. A hitherto hidebound place is turning into something more informal, more open and more varied.

The biggest single reason is the huge influx of refugees and asylum-seekers, which peaked in the summer of 2015. Mrs Merkel famously vowed to keep Germany’s borders open to hundreds of thousands of newcomers, though later she tightened up the rules. In 2015 and 2016 a total of 1.2m people arrived, a significant addition to the population of 81m. But the old vision of what it means to be German was already being challenged by earlier arrivals. In last year’s election, for example, the share of MPs with a migrant background rose to 8%, up from 3% in 2009 (though it would have to go up to 23% to be truly representative of the population).

Cool Germania

The Unbehagen also reflects deeper trends. “Germany is in the process of a great transformation into a more plural society,” says Marcel Fratzscher, director of the German Institute for Economic Research in Berlin. Church attendance is declining. People are divorcing more and marrying less (apart from gay couples, who were finally given the right to wed last year). A patriarchal country is slowly becoming more gender-balanced. Mrs Merkel’s governments have greatly increased the availability of child care, introduced quotas for women on company boards and boosted wage transparency. In the past 15 years the share of working-age women with jobs has increased from 58% to 70%.

These changes have been widely welcomed. “Germany has become much more relaxed under Angela Merkel,” says Peter Altmaier, the new economics minister and the chancellor’s closest cabinet ally. Bernd Ulrich, a liberal commentator, reckons that “German angst” has given way to “German coolness”. The unofficial anthem of this cool new Germany is a music video in English called “Be Deutsch” (see picture) by Jan Böhmermann, a German comedian, which has been viewed over 7m times. “Guten Tag, the true Germans are here/ We are xenophobics’ biggest fear/ You call for strong leaders, fences and walls/ But being like us takes bigger balls,” goes the song, as muesli-munching, European-flag-waving Germans stand up to anti-refugee protesters. “We are no longer murderous vandals/ We’ll come for you in socks and sandals.”

But not everyone approves. A cultural divide is opening up between urban regions and more conservative suburban and rural areas. “Cities like Munich, Cologne and Berlin now have more in common with each other than with their own hinterlands,” says Michael Bröning, author of a new book on nationhood. And rising crime rates and cultural battles like the one in Essen are making society feel more raw. On New Year’s Eve 2015 in Cologne some 1,000 women were sexually assaulted by a crowd made up largely of immigrants. A year later an Islamist terrorist from Tunisia drove a hijacked truck into a Christmas market in Berlin, killing 12. The titles of recent books and films—“Nervous Republic”, “Fear for Germany”, “The End of Germany”—capture the public mood at its gloomiest.

Economically, the new Germans are sitting comfortably. The country has a record trade surplus and record low unemployment and enjoyed a budget surplus of €37bn ($47bn), or 1.1% of GDP, last year. Yet even here Unbehagen is creeping in. Globalisation and technology are hollowing out the German labour market and creating new divides between haves and have-nots. And Germany’s mighty engineering industry, the very driver of its prosperity, is being disrupted by new technologies and competitors that upend old business models.

At the same time the world’s expectations of German defence and foreign policies are running ahead of what its citizens are willing to endorse. When Donald Trump was elected America’s president in 2016, Germany, though reticent on the world stage and pacifist in its instincts, was hailed as the “new leader of the free world”, thanks partly to its role in the refugee crisis and partly to its credentials in a Europe where France looked weak. But it was not what the Germans wanted. The election of Emmanuel Macron as president has provided them with a more equal partner in Europe, though his ideas for an integrated euro zone make them deeply uncomfortable.

As the old Germans give way to the new sort, the questions mount. Guntram Wolff, the German director of a Brussels-based think-tank, Bruegel, speaks for many when he asks: “Who are we, what kind of a country are we?”