The number of Syrian refugees in neighbouring countries has passed 4 million, the UN refugee agency UNHCR said on Thursday, adding that the total was on course to reach 4.27 million by the end of 2015.

Migrants from Syria and Afghanistan sleep inside a mosque in Kumanovo, Macedonia, close to the Serbian border, June 18, 2015. REUTERS/Ognen Teofilovski

"This is the biggest refugee population from a single conflict in a generation. It is a population that needs the support of the world but is instead living in dire conditions and sinking deeper into poverty,” UN High Commissioner for Refugees António Guterres said in a statement.

A migrant from Syria breastfeeds her baby inside a mosque in Kumanovo, Macedonia, close to the Serbian border, June 18, 2015. REUTERS/Ognen Teofilovski

Most refugees from Syria's four years of war are in Lebanon, Jordan, Iraq, Egypt and Turkey, which has more refugees than any other country, with 1.8 million Syrians. A further 270,000 Syrians have asked for asylum in Europe and 7.6 million more are displaced within Syria.

Syrian refugees shop at the main market, in preparation for the Muslim holy month of Ramadan, at the Al-Zaatari refugee camp in Mafraq, Jordan. REUTERS/Muhammad Hamed

“Worsening conditions are driving growing numbers towards Europe and further afield, but the overwhelming majority remain in the region. We cannot afford to let them and the communities hosting them slide further into desperation," Guterres said.

A Syrian refugee walks with her children during rainy weather at the Al Zaatari refugee camp in the Jordanian city of Mafraq. REUTERS/Muhammad Hamed/Files

UNHCR's appeal for $5.5 billion to support the Syrian refugees in 2015 is only 24 percent funded. The UN World Food Programme has already cut rations for refugees because of a lack of cash.

About 86 percent of the 630,000 in Jordan live below the poverty line of $3.2 per day, the UNHCR statement said, while more than half of the 1.173 million Syrians in Lebanon live in sub-standard shelters.