Balkan countries will only open their borders to migrants fleeing the Middle East and Afghanistan, the UN says.
Macedonia and Serbia made the move after Slovenia informed them it would not accept “economic migrants”, country officials said.
Hundreds of people are now stranded on borders.
Right-wing European politicians called for border closures following indications that one of the Paris attackers posed as a migrant.
Serbia implemented the move late on Wednesday, according to UNHCR spokeswoman Melita Sunjic.
“As of 6pm yesterday evening, Serbia started turning back (to Macedonia) all but Syrians, Iraqis and Afghans,” she said.
A police spokesman in Slovenia confirmed the country would return “economic migrants” entering through Croatia, only allowing entry to those “from countries where there are armed battles”.