Police fired tear gas from behind barbed wire as an angry crowd demanded passage through Macedonia.
Thousands of migrants were stranded near the Macedonian town of Gevgelija trying to get in from Greece, where they entered Europe. They aim to travel on to prosperous northern European countries.
Macedonian government sent riot police and army troops to restore order and deal with the inflow of people choking rail hubs.
Greece and other Southern European countries are being deluged by tens of thousands of refugees from troubled regions of the Middle East and North Africa. The EU is struggling to deal with the arrivals, with members bickering over quotas to accept them.