Greek riot police have fired tear gas and stun grenades at refugees and other migrants who tried to push a railway carriage through a cordon during a protest at a crowded camp on the border with Macedonia.
Police said about 200 people were involved in the violence, and the migrants also attacked officers with stones. There were no immediate reports of injuries or arrests.
The sprawling Idomeni camp is home to about 10,000 people trapped in Greece after a series of border closures further north on the Balkan migration route to Europe's prosperous heartland.
Camp residents have for weeks blocked a freight railway line that enters Macedonia at the spot.
Officials said protesters pushed an empty carriage at police stationed on the line just before the Macedonian border fence.
Meanwhile, a small tent city has formed on Serbia's border with Hungary where migrants are waiting to cross into the EU.
Dozens of migrants, including small children, have been camping in a few dozen tents on a littered field by Hungary's border fence, braving rain and cold nights determined to pursue their dream of a better future in Europe.
Aid workers say Hungarian authorities have been letting into the country small groups of about 20 people a day, mostly families with small children.