The desperate group of men, women and children had set off from an overcrowded refugee camp on the Greek side on Monday and waded thigh-deep through a river to get into Macedonia, where they were stopped by troops.
"Yesterday we had a large group of illegal migrants who tried and managed to cross the border unlawfully near the village of Moin," Toni Janevski, a Macedonian army spokesman, told AFP.
"Without any incident or use of force, they were blocked and in the early morning hours they were returned to Greece."
Back on the Greek side, however, AFP reporters said they had seen at least two men who appeared to have been beaten, while a Greek government source said the migrants were sent back by "non-legal" crossings.
A group of around 80 journalists and activists who were detained by Macedonian police after travelling with the group were also released and allowed to return to Greece.
'Put on trucks'
The migrants were trying to escape a camp in Idomeni, where 14,000 or so people have been stuck in increasing squalor following a string of border closures on the European migrant route.
An AFP video journalist who was with them said the Macedonian army had allowed the migrants to get as far as the village square in Moin, where they were herded together.
They were all told to sit on the ground and the media were taken away first, the journalist said.
A Syrian refugee told AFP that they were then divided into groups of 100.
"They put us on army trucks, took us to a location some 10 minutes from Idomeni where the fence is broken, and sent us back through there," he said.
The Macedonian police said 1,500 had managed to cross into Macedonia before being returned, and another 600 were prevented from entering.
The returns appeared to surprise the Greek authorities, who had said earlier Tuesday that some 700 refugees and migrants remained stranded in Macedonia, indicating that they were ready to discuss their readmission if Macedonia asked.
"There wasn't in any case an official request for readmission from Skopje, and no return through official crossing points," said the Greek government source.
"Nearly all the refugees have come back through an unguarded location," added a local Greek police source.
Greek Prime Minister Alexis Tsipras meanwhile denounced the "criminal" attitude of people who appeared to have orchestrated the migrants' attempt to cross into Macedonia, and called on them to take note of the closure of the Balkan route.
He said there had been in Idomeni "an unacceptable situation, with strangers, perhaps pretending to be volunteers" who had encouraged migrants to go to Macedonia "at risk to their lives".
Greek authorities said the migrants had read leaflets in Arabic which described the route across the river and warned they risked being sent back to Turkey if they stayed in Greece, the ANA news agency reported.