Police in Macedonia fired tear gas and stun grenades at desperate migrants stranded for days at the Greek border and who are demanding passage to western Europe, as soldiers began erecting a metal fence to keep them out.
Macedonia, along with other Balkan countries on the migrant route, began turning away "economic migrants" nearly two weeks ago.
Human rights groups have criticised the decision, under which only Syrians, Iraqis and Afghans are allowed through.
Saturday's violence broke out after one migrant, believed to be a Moroccan, was electrocuted and badly burned when he climbed on top of a train wagon.