Until about a week ago, Cologne was probably best known outside Germany for its charming old town and beautiful medieval cathedral. Now, following the New Year’s Eve attacks, it is the city that could bring down Angela Merkel.

The serious nature of the attacks and their aftermath were unclear at first but, 10 days on, the ramifications are growing not just for Germany, but Europe as a whole.

An astounding 500 criminal complaints have been made by women about the criminal behaviour of large groups of men on December 31 around the busy railway station and cathedral precinct in the centre of Cologne. Hundreds allege they were sexually assaulted and hundreds of others say they were robbed. All claim the perpetrators were gangs of men overwhelmingly of Arab and North African origin. The scale of the attacks, which it later emerged were also taking place in Hamburg, was unprecedented and, according to Germany’s justice minister Heiko Maas, they were also organised, co-ordinated on the night using smart-phone apps and social media.

Of the 19 men under investigation by state police, none is a German national. Fourteen are from Morocco and Algeria and 10 are asylum seekers, nine of whom arrived late last year when the Chancellor opened Germany’s borders in a bid to alleviate the terrible suffering evident from the biggest mass movement of people seen since the Second World War.

The details emerging from Cologne are truly shocking: crib sheets used by the attackers featuring offensive and disgusting phrases in German, no doubt aimed at intimidating, humiliating and scaring the victims; a police department that initially covered up the scale of the attacks and the ethnic make-up of the perpetrators; and a media that decided not to report the truth.

It is inevitable that the mood in Germany changed as the truth emerged, from initial shock and confusion to anger and outrage, with the Chancellor herself increasingly under pressure over her open-door policy. It is also inevitable that her right-wing, anti-immigration enemies – many of whom are racist beneath polished, seemingly reasonable surfaces – have made hay with the situation.

Make no mistake, these are dangerous times for Mrs Merkel. The slack she is usually cut for leading her country to enviable success over the past decade is tightening by the day.

So, will this well-intentioned decision to allow more than one million refugees and immigrants into Germany be her undoing? Quite possibly. After keeping faith with her for so long on the economy, the euro and dealings with Russia, the German people are clearly losing faith in her ability to manage the consequences of her uncharacteristically idealistic and humane decision on refugees. The calls for her resignation are building.

The other big question is related in many ways. Can Mrs Merkel convince the German public, indeed the wider European audience that looks to her for leadership, that there is a way to successfully integrate new arrivals to Europe, the majority of whom are young men who come from Muslim countries, often from societies that treat women abominably? Was what happened in Cologne just a one-off, opportunistic crime spree, or a warning of a more serious cultural divide that will be impossible for Western countries, regardless of how progressive and well-intentioned, to bridge?

Indeed, what should we in Western Europe expect of those who arrive as refugees and migrants: complete integration or some sort of messy co-existence? Are either of these two things possible? Are they even desirable? These most complex and most sensitive of questions will haunt Germany in the months and years to come whether Angela Merkel is Chancellor or not. And, in the political landscape that is emerging in Europe in the aftermath of the Paris attacks, they will haunt us here in the UK and Scotland too.

There are no easy answers; only headaches and hand-wringing, especially for those of us who wish to show humanity to refugees. It’s probably best to avoid mass cultural generalisations but we also have to make it absolutely clear to all – new arrivals and existing citizens alike – that gender-based crime and violence will not be tolerated. Where there are specific cultural issues around gender and sexuality, we should be fearless in explaining to those wishing to seek a new life in our countries the rights and expectations enjoyed by all citizens. If refugees and migrants commit crimes, they should be held accountable, just like everyone else.

What we mustn’t do is overreact or surrender to fear. Mrs Merkel know this only too well, which is why she is being so careful in the course she is steering. She may find a way through it all yet. But her time is running out.