Stranded migrants battle police on Greece-Macedonia border
Clashes between riot police and migrants angry at being prevented from entering Macedonia from Greece have left up to 40 people injured.
Macedonian soldiers raised a new fence on the southern border with Greece on Saturday to manage the migrants.
Dozens of migrants, stuck in Greece after Balkan countries imposed tougher entry conditions, threw stones.
Reports suggest that Macedonian police briefly entered Greece and fired stun grenades on the rioters.
Macedonia's interior ministry says 18 police officers were injured, with two hospitalised. Some 20 migrants were treated for head injuries and breathing problems, aid groups told Associated Press news agency.
The International Organization for Migration (IOM) says 105,000 migrants have passed through Macedonia after arriving in Greece this month.[an error occurred while processing this directive]
Throughout 2015, close to 720,000 migrants - mainly from Syria, Iraq and Afghanistan - have arrived in Greece.
The IOM says most then travel onwards through Macedonia. The most popular route for migrants sees them move further north towards Germany and Scandinavia.
Analysis - Guy De Launey, BBC News, Belgrade
Macedonia insists it is not closing the border completely. A government spokesman said the fence would simply redirect people to official crossing points.
But those border crossings will not be open to all. Macedonia is allowing through refugees only from Syria, Iraq and Afghanistan. Other nationalities are being stopped.
There have already been protests in response. Hundreds of people from countries such as Morocco, Algeria and Pakistan ripped up a barbed wire barrier on Thursday. Others have protested by sewing their mouths shut.
Slovenia, Croatia and Serbia have all implemented similar restrictions based on nationality.
Many of those refused entry to Macedonia from Greece are from Iran, Pakistan and Morocco.
One Moroccan man denied entry into Macedonia was taken to hospital with severe burns on Saturday after climbing on top of a train carriage and touching a live wire.
Soon after, the first clashes were reported. Footage showed migrants chanting "Open, open" as the fence was erected, before stones were thrown.
Close to 250 people were involved in the clashes on the Greek side of the border, AP reports, with some 800 people stranded.
"I have been here for 10 days with my two sons," one Iranian woman, Fatemeh, said. "We have decided to return to Athens and see what we will do."
A note on terminology: The BBC uses the term migrant to refer to all people on the move who have yet to complete the legal process of claiming asylum. This group includes people fleeing war-torn countries such as Syria, who are likely to be granted refugee status, as well as people who are seeking jobs and better lives, who governments are likely to rule are economic migrants.