Thousands of migrants, many of them refugees from Syria, are walking into southern Serbia, on the latest leg of an increasingly desperate journey to western Europe. State authorities and aid agencies scrambled to help the tired masses surging through the western Balkans. Their numbers have swelled since Greece began ferrying migrants from overwhelmed islands to the mainland.

Red Cross official Ahmet Halimi said 8,000 migrants had registered in the southern Serbian town of Presevo over the past 24 hours. In the past two weeks, over 23,000 have entered Serbia, taking the total so far this year to 90,000.

Many had spent three desperate days on Greece's northern border after Macedonia halted their passage saying it could take no more. But crowds braved batons and stun grenades to storm through police lines. Helpless to stem the tide, Macedonia rushed trains and buses to the border to carry them north, where they crossed into Serbia on foot.

Their first stop in Serbia was a reception centre in Presevo, where many received medical aid, food and papers legalising their transit through the country.

Not since the wars of Yugoslavia's collapse has the western Balkans seen such large movements of people. In the early 1990s many Bosnians, Croats, Albanians and Serbs displaced by fighting fled for wealthy countries such as Germany, Austria and Sweden – the very countries that the current wave of migrants favour. Germany says it expects a record 750,000 asylum-seekers to arrive this year.

The refugees' plight threatens to get worse as Hungary, part of Europe's borderless Schengen zone, races to complete a fence along its 175-km border with Serbia, threatening to create a dangerous bottleneck. Every day, around 1,500 refugees stream through the woods from Serbia into Hungary. While the country is a transit route rather than a destination for most, the growing influx is polarising Hungarians and fuelling racism.