It was hard not to think, these past few days, that whatever remained of a Europe of values, or even of basic humanitarian sentiment, was fast unravelling. The scenes of weary refugees being pushed from one country to the next, sometimes hounded by police or the military, sometimes exposed to tear gas, are challenging the very idea of Europe. Hungary, where the hardline prime minister, Viktor Orbán, has legislated to imprison refugees who try to breach its fences, seems impervious to criticism. That rejection of the refugees has to a degree been imitated in Croatia, Serbia and Slovenia, all intent on moving the human tide along as fast as possible. The war of words between some of these countries’ representatives was all too reminiscent of the language of the regional tensions of 25 years ago, old hostilities re-ignited by the common European failure to overcome the difficulties and forge a joint strategy to share the problem and address it in a pragmatic and humane way.

Witness how Croatia, where 20,000 people arrived in two days, announced that it had decided to force Hungary to take in a flow of families who had rerouted to Croatia after they had been blocked by the new fence along the Hungarian-Serbian border. In response, Hungary accused Croatia of violating its sovereignty. Now it has reportedly started to build another fence on its border with Croatia, and hinted that it might block its neighbour’s accession to the Schengen zone. Slovenia’s prime minister has spoken of setting up a “corridor” that would give refugees free passage from the Balkans to northern Europe. These acrimonious exchanges should weigh heavily on Wednesday’s summit of EU leaders as they make yet another attempt to reach agreement on how to tackle the refugee question.

Nor will Germany’s Angela Merkel be able to duck the charge of contributing to the upsurge in numbers after laying out the welcome mat three weeks ago. She revoked her offer only after fierce criticism from her Bavarian-based CSU political partner, which complained that neither Munich’s train station nor its social services could cope. While it is impossible to deny the challenge such large numbers pose, Mrs Merkel’s show of humanism should be welcomed, if only as a call to the rest of the EU to mobilise.

At this week’s meetings, EU leaders must finally set aside their differences

But while Mrs Merkel may have contributed a pull factor by offering hope to hundreds of thousands of refugees, the main push factor behind the exodus remains in Syria itself. It is not only Isis. The Assad regime – backed anew by Russia – continues to pursue indiscriminate assaults on urban areas. Now it is forcibly enlisting young men into its army. It is also claimed that Syrian authorities have made it easier to get passports recently, possibly to encourage the flight of refugees as a way of focusing attention on the war’s external fallout, rather than on the methods used to wage it. Determined diplomacy, involving all key players, to end the war must be part of the answer.

There is a second factor driving people north: the outrageous shortfall in international funding for the UN agencies that support the four million Syrians displaced in neighbouring Lebanon, Turkey and Jordan. With the diminishing prospect of being able to return home, it is no surprise that thousands have flocked to Europe in the hope of giving their children a better future.

At this week’s meetings, EU leaders must finally set aside their differences. This is not to minimise the difficulties. But, by galvanising damaging populism, their arguments obscure the real nature of the problem. As Alexander Betts, the director of Oxford’s refugee studies centre, argues in the Observer, two trends have collided. The first is the flight of Syrians seeking asylum. To them, there is a clear and unquestioned obligation. But they have been joined by hundreds of thousands of other people who also have powerful reasons to despair of a better life in their own countries: “survival migrants”, as Professor Betts describes them. It is the lack of a policy for these people that makes helping Syrians and other asylum-seekers so much harder.

This great human movement poses a huge strategic challenge that cannot be addressed only at a national level. It needs EU-wide investment and leadership. But properly managed it could (like most previous great migrations into Europe), bring great rewards. This week, though, the attention should be on finding a way for the EU’s 500 million people to welcome in a decent manner a group of refugees who represent less than a third of 1% of its total population.