Thousands of migrants were heading north towards the EU border on Sunday after being stranded for days on the Greece-Macedonia frontier.
The mass movement came after Macedonia police on Saturday reopened the country's southern frontier, enabling thousands to travel north towards Serbia from which they seek to enter the European Union (EU).
Macedonia on Thursday declared a state of emergency and sealed off its southern border in a bid to halt the influx, leaving thousands stranded in no-man's land.
But two days later, it lifted the restrictions.
By Sunday morning, more than 3,500 refugees and migrants had crossed into Serbia where they were given food and shelter from the chilly weather at a tent camp in the border village of Miratovac, the Serbian public broadcaster RTS reported.
They were then being bussed to the nearby town of Presevo where police handed out documents and helped them take buses to the border with Hungary, an EU member state, RTS said.
Hundreds more were crossing the border from Macedonia, the report said.
Police in Gevgelija on Macedonia's southern border with Greece said they had issued transit papers for some 4,000 people in last 24 hours.
Around a thousand others were still waiting for the documents, allowing them to travel across Macedonia, while hundreds more refugees were pouring freely across from the border with Greece, AFP reporters said.
Police had previously said they would only admit "a limited number" of people but they were now making no attempt to stop any of those crossing, the correspondents said.
Late on Saturday, more than 1,500 people who had been stranded between the Greek and Macedonian borders for three days were allowed to cross into Macedonia after police allowed them to pass despite earlier trying to hold them back with stun grenades.
They joined thousands who had managed to break through the police cordon or who sneaked in through the forested hills.
Dozens of buses and taxies then took them overnight towards the northern border with Serbia, local media reported. Several extra trains were also laid on to deal with the surge in numbers.
It takes around four hours by train to reach Tabanovce on Macedonia's northern border with Serbia, some 180 kilometres (110 miles) away.
Macedonian police spokesperson Ivo Kotevski said police did not want to use force but would seek to control the flow of arrivals.
"We will continue with reinforced control of the border according to the state of emergency and we will (in future) allow only a limited number of people into the country in accordance with the capacities we have," Kotevski told AFP by phone on Saturday.
Until this weekend, more than 42,000 people, including more than 7,000 children, had entered Macedonia from Greece since mid-June, the government in Skopje said.
Once they reach Serbia, many migrants and refugees try to make their way to Hungary, which is a major crossing point into the EU, although the country is building a four-metre (13-foot) barbed wire fence along its 175-kilometre border to stop the influx.