Hundreds of dejected migrants have returned to a transit camp in northern Greece after Macedonian authorities blocked their attempt to cross the border.
About 2000 migrants marched out of the Idomeni camp on Monday, hiking into the mountains and fording a river in what Greek authorities said was a well-planned attempt to find a way around a barbed wire fence built by Macedonia to keep them out.
Three migrants drowned on Monday trying to cross a river into Macedonia, one stage on a route that the migrants hoped would take them to Germany and other wealthy European Union countries.
Macedonia loaded about 1500 migrants and refugees who had succeeded in crossing the border onto trucks and drove them back to Greece, Macedonian police said.
Reporters and aid officials said the migrants were left at the Greek border.
Hundreds more migrants were prevented from crossing the border on Monday, and many of them streamed back to Idomeni on Tuesday after spending the night in the mountains.
Migrants carried children across a fast-flowing river before trudging back along muddy paths.
One small child was dragged along on a blue plastic container attached to a rope.
"It's a long way from the camp to the mountains, it took me six hours of walking. At my age, it was very difficult," said one of those returning, 60-year-old Mohammad Kattan.
Back in Idomeni, the camp was crowded, muddy and wet. People started fires to dry their clothes and to warm up.
Several hundred migrants found shelter in a deserted farm in the area.