The crisis in German politics has been postponed for at least a fortnight. Angela Merkel has rescued her coalition by promising to negotiate a deal within the wider EU about the settlement of refugees. The CSU, the Bavarian party in her conservative parliamentary grouping, had threatened to close the border to refugees trying to re-enter the country after being denied asylum once; this will not now happen until a more general deal has been reached. The crisis goes to the heart of the question – both moral and political – of what are the obligations that the settled world owes to the migrants who come to our frontiers.

The question is increasingly being posed in religious terms. The Bavarian state government, which has been in the hands of the CSU since 1966, started to display crosses on the front of all public buildings – a move opposed by the Catholic Church in Germany, even though the CSU identifies as strongly Catholic. The CSU claimed that the cross was not in this context a theological symbol, but a marker of culture. This is not entirely disingenuous. Religion and culture cannot be completely disentangled from each other: a religion that is not nourished by cultural practice will die in a generation.

Yet some of the anti-immigrant parties claim the danger of dark-skinned migrants is posed by their religion; others that it arises from their culture. The effect of these various scruples may well be the same: closed frontiers, families split, children imprisoned apart from their parents, refugees tortured, raped, drowned, or left to die in deserts on their journeys, all to discourage the others – but the rhetoric will be different and the different emphases matter. The established parties, such as the CSU, claim their hostility is cultural, while the insurgents, like the AfD in Germany, or Steve Bannon in the US, claim that it is religious. This is the underlying belief of the new global right, from Vladimir Putin all the way through Europe and on to Donald Trump.

It has grown into an existential challenge to all universalist and humanitarian ideologies, whether they are religious or secular. These movements of peace have often been instruments of war. The gap between theory and practice persists in our politics to this day, only now it is domestic. Is Christianity a badge of European identity against the Muslim hordes, or is it a way of understanding refugees as strangers whom the Bible commands Christians to welcome? Did Enlightenment values demand the invasions of Iraq and Afghanistan, or should they have warned us off?

Piety and preaching won’t make Europe welcome refugees, nor soften the heart of the US Republican party, which has sunk under Mr Trump into a fetid swamp of ethnonationalism. Only the slow growth of a culture shared between migrant host populations will do that. But humanitarian ideals do allow us to understand that the problem is a global one, which demands global solutions. This crisis is not just about the attractions of Europe or the US. It is just as much about the dreadful conditions in Central America, Eritrea, Syria and Afghanistan. So long as these countries are sunk in anarchy or ravaged by war, desperate people will leave them. Mrs Merkel wants the burden of refugees spread across Europe and that is right. But any lasting solution must reach beyond the borders of the countries of refuge. This does not mean filling north Africa with internment camps. In the long run, generous aid to bring peace and the conditions of prosperity to the countries which refugees now flee will prove essential.