PARIS — A decision by the Macedonian authorities to block thousands of Afghan asylum seekers from crossing into the country from Greece set off clashes between migrants and the police on Tuesday, highlighting the challenges facing European nations as they seek to check the flow of people to the Continent.

Greek riot police officers forcibly removed groups of Afghan protesters from train tracks at a migrant camp in Idomeni, Greece, a crossing point to Macedonia and a gateway toward Northern Europe, after Macedonia abruptly announced that Afghans would be classified as economic migrants, disqualifying them from political asylum.

The policy shift, unveiled this weekend after Austria, Croatia and Serbia announced that they would restrict migrant entries, means that newly arriving Afghans, who make up a third of asylum seekers in Europe, can now pass no farther north than Greece. Thousands more who are migrating north are stuck in countries where borders have been temporarily closed.