Macedonian police have fired tear gas to disperse thousands of migrants trying to enter from Greece.
It comes a day after Macedonia declared a state of emergency in two border regions to cope with an influx of migrants, many from the Middle East.
Large numbers spent the night stuck on Macedonia's southern frontier, and tried to charge police in the morning.
The Balkan nation has become a major transit point for migrants trying to reach northern EU members.
Witnesses said razor wire was rolled across the border, preventing people from entering Macedonia. There are reports of the border also having been closed last month.
Some 44,000 people have reportedly travelled through the country in the past two months.
At least five people were injured in the clashes at the border with Greece.
An 18-year-old Syrian man told Reuters he was able to cross overnight into Macedonia, but others were caught and driven back.
"I ran fast and escaped," he said. "They got my brother and most of the others and sent them back to Greece."
In recent weeks there have been chaotic scenes at Gevgelija station, with migrants trying to clamber on board packed trains bound north.
As well as Gevgelija, Macedonia declared a state of emergency in northern Kumanovo, where migrants attempt to travel on to Serbia, the next stop before entering Hungary, which is part of the EU.
Greece itself has seen almost 160,000 people landing on its shores since January, the UN estimates, with 50,000 arriving in the past month alone.
There were fears that by effectively shutting off its borders, Macedonia would create a backlog of migrants at its frontiers.
Those trying to reach northern and western Europe come from the Middle East, Africa and Asia, but many arriving in Macedonia are escaping the conflict in Syria.
Analysis - Guy De Launey, BBC News, Belgrade
The message was spelt out in tear gas - migrants are no longer welcome in Macedonia. Police in the border town of Gevgelija took action after a crowd of around 3,000 charged a barbed wire fence.
Migrants have been flowing through Macedonia all year. Many of them come from Iraq, Syria and Afghanistan and they're hoping to reach European Union countries.
Until now, the Macedonian authorities have taken a relaxed attitude - allowing migrants to travel through and out of the country. But, recently, numbers have increased - and Macedonia says it can't cope. The state of emergency means troops will try to stop migrants at the border.
It comes a day after Macedonia declared a state of emergency in two border regions to cope with an influx of migrants, many from the Middle East.
Large numbers spent the night stuck on Macedonia's southern frontier, and tried to charge police in the morning.
The Balkan nation has become a major transit point for migrants trying to reach northern EU members.
Witnesses said razor wire was rolled across the border, preventing people from entering Macedonia. There are reports of the border also having been closed last month.
Some 44,000 people have reportedly travelled through the country in the past two months.
At least five people were injured in the clashes at the border with Greece.
An 18-year-old Syrian man told Reuters he was able to cross overnight into Macedonia, but others were caught and driven back.
"I ran fast and escaped," he said. "They got my brother and most of the others and sent them back to Greece."
In recent weeks there have been chaotic scenes at Gevgelija station, with migrants trying to clamber on board packed trains bound north.
As well as Gevgelija, Macedonia declared a state of emergency in northern Kumanovo, where migrants attempt to travel on to Serbia, the next stop before entering Hungary, which is part of the EU.
Greece itself has seen almost 160,000 people landing on its shores since January, the UN estimates, with 50,000 arriving in the past month alone.
There were fears that by effectively shutting off its borders, Macedonia would create a backlog of migrants at its frontiers.
Those trying to reach northern and western Europe come from the Middle East, Africa and Asia, but many arriving in Macedonia are escaping the conflict in Syria.
Analysis - Guy De Launey, BBC News, Belgrade
The message was spelt out in tear gas - migrants are no longer welcome in Macedonia. Police in the border town of Gevgelija took action after a crowd of around 3,000 charged a barbed wire fence.
Migrants have been flowing through Macedonia all year. Many of them come from Iraq, Syria and Afghanistan and they're hoping to reach European Union countries.
Until now, the Macedonian authorities have taken a relaxed attitude - allowing migrants to travel through and out of the country. But, recently, numbers have increased - and Macedonia says it can't cope. The state of emergency means troops will try to stop migrants at the border.
Comment