THE fighting in Syria and its spread into Iraq have created the worst refugee crisis since the second world war. Since the spring of 2011 nearly half of Syria’s population has been displaced, with 7.6m of those who have had to flee staying within their homeland and 3.3m more in camps abroad. Since the UN High Commissioner for Refugees (UNHCR) reported that in 2013 the number of refugees and internally displaced people worldwide exceeded 50m for the first time since the 1940s, and rose by 6m in 2012 largely due to Syria’s civil war, a further 1m Syrians and 2m Iraqis have been added to that grim total.

Dealing with Syrian refugees is now the UNHCR’s largest-ever operation. It and other aid agencies are struggling to cope. The World Food Programme is warning of an impending winter hunger crisis. Earlier this month it briefly suspended a food-voucher scheme for some 1.7m Syrian refugees in neighbouring countries because it had no money to pay for it.

On December 8th the UN said it is trying to raise $16.4 billion to meet the humanitarian needs of refugees everywhere, up from the $12.9 billion it sought last year (though even this sum may not include every fundraising effort by the UN’s numerous agencies). More than $7 billion of that total will be spent on those afflicted by the war in Syria. In Berlin on December 18th Germany will host a meeting of governments focused on securing the money requested for helping Syrian refugees.

So far the UNHCR has received little over half the $6 billion asked for in six previous appeals for funds since the fighting in Syria began. The amount sought is so large because the countries hosting the most people are reaching the limits of their ability to cope. Lebanon has 1.1m registered Syrian refugees, Turkey 1.2m and Jordan 620,000. Many more are unregistered.

Tellingly, the new appeal is being launched jointly by UNHCR and the UN Development Programme, meaning more of the money can be directed to building the infrastructure needed to support refugees in the longer term, from roads to schools and health-care facilities. It is increasingly clear that the current set-up for humanitarian assistance and international aid is unable to cope with refugees turning into long-term residents, especially in middle-income countries that no longer qualify for traditional development aid.

The biggest donors to help those from Syria and now Iraq so far are America, Britain and the European Union. European countries, in particular, have been criticised for pursuing a “keep them there” strategy of giving relatively generously to support refugees in and around Syria, but welcoming hardly any to live within their borders. An attempt by UNHCR to change that in Geneva on December 9th by persuading donor countries to take in larger numbers ended in disappointment, falling around 30,000 short of the agency’s initial goal to find new homes for 130,000 by 2016.

That is despite Germany’s willingness to set an example by taking in at least 30,000. Others, including Britain and Ireland, have taken just a handful. A far higher share were resettled after the war in Iraq that began in 2003, and there is certainly a case to be made that rich countries could be welcoming many more this time. But a growing hostility to refugees in many European countries seems to be taking its toll on the honourable humanitarian tradition of offering them a new home.

Keeping Syrian and Iraqi refugees out of Europe, if that remains the goal, will require improving the dire conditions in which many live in makeshift camps in neighbouring countries. In 2013 alone, more than 11,000 Syrians made it through Turkey and into the EU via Bulgaria. To stop many more following, European countries will need to spend heavily to give these unfortunates a good reason to stay closer to what was once home.