Hundreds of migrants crossed unhindered from Greece into Macedonia after overwhelmed security forces appeared to abandon a bid to stem their flow through the Balkans to western Europe following days of chaos and confrontation.

Riot police remained, but did little to slow the passage of a steady stream of migrants, many of them refugees from the Syrian war and other conflicts in the Middle East.

Macedonia had declared a state of emergency on Thursday and sealed its southern frontier to migrants pouring in at a rate of 2,000 per day en route to Serbia then Hungary and the EU's borderless Schengen zone.

That led to desperate scenes at the border, as men, women and children slept under open skies with little access to food or water.

Saying they would ration access, riot police used tear gas and stun grenades to drive back crowds,but were overwhelmed on Saturday by several thousand who tore through police lines or ran through nearby empty fields.

The state eventually laid on extra trains, and buses arrived from across the country to take the migrants swiftly north to Serbia and the next step of a long journey from the Middle East, Africa and Asia.

Abdullah Bilal, 41, from the devastated Syrian city of Aleppo, said: "It it was very peaceful. The Macedonian police told us 'Welcome to Macedonia; trains and buses are waiting for you.'"

Mohannad Albayati, 35, from Damascus, travelling with his wife, two children and three brothers, said: "I passed one step but it is a long road to my destination. With Allah's help I will go to Germany."

The backlog created in Macedonia, which faces criticism from aid agencies for not expanding capacity to receive and process the migrants, reached Serbia overnight, straining the country's own ad hoc reception centres.

A Serbian government official said: "So far we have more than 5,000 new arrivals. This is the biggest number in one day so far. They are waiting in long lines as we process them."

Macedonia has accused neighbouring Greece, with which it enjoys a tense relationship, of aiding the migrants' journey north at a pace the Balkan country says it cannot cope with.

Greece has begun chartering boats to take migrants from inundated Greek islands to the mainland, after a record 50,000 hit Greek shores by boat from Turkey in July alone.

Meanwhile, Italy's coastguard said it had co-ordinated the rescue of some 4,400 migrants in a single day, a record-setting number, as smugglers took advantage of ideal sea conditions off Libya to launch a fleet of overcrowded, unseaworthy boats.

The coastguard said 22 rescue operations were carried out on Saturday for motorised rubber dinghies and fishing boats, all crammed with migrants desperate to reach Europe's southern shores.

Italian coastguard, navy and border police boats pitched in, as did Norwegian and Irish naval vessels deployed in a European patrol-and-rescue force.

So far this year, some 110,000 migrants have been rescued off Libya and brought to southern Italian ports.