Greek police have transferred some 2,300 foreign migrants stranded for weeks at a border crossing with Macedonia to the capital, Athens.
Some will be housed in temporary camps at two former Olympic stadiums.
The migrants have been stranded since Macedonia started filtering by nationality – allowing through only those from war zones.
The UN refugee agency says more than 900,000 refugees and migrants have reached the EU since January.
Separately on Wednesday, 12 migrants drowned and 12 more were reported missing after a boat carrying about 50 people sank off the small Greek island of Farmakonisi in the early hours.
More than 3,500 people have died or have been reported missing this year while trying to cross the Mediterranean into Europe.
Scuffles
Some 350 Greek policemen were mobilised before dawn to put migrants from the Idomeni border area on to about 45 buses to Athens.
They were mainly from Iran, Pakistan, Bangladesh, Somalia and Morocco.
Some scuffles broke out and about 30 men were taken to a police station. They were later put on the Athens-bound buses along with the other migrants.
Aid workers and journalists were kept away from the operation, which Greek police said was completed smoothly.
The Idomeni crossing has been the scene of angry demonstrations among migrants who have been stranded for three weeks.
The bottleneck occurred after Macedonia blocked passage to those not fleeing war zones in Syria, Iraq or Afghanistan.
A few sewed their lips shut in protest.
Some tents and temporary houses were destroyed.
The migrants now transferred to Athens will be allowed to file for asylum, while the others will be repatriated.
Meanwhile, Greek coastguard and navy ships were still searching for survivors of the boat that sank off Farmakonisi.
Six of those who drowned were children. Some 26 people were rescued.
Although the weather was good, the vessel reportedly started taking on water after leaving the Turkish coast.
A note on terminology: The BBC uses the term migrant to refer to all people on the move who have yet to complete the legal process of claiming asylum. This group includes people fleeing war-torn countries such as Syria, who are likely to be granted refugee status, as well as people who are seeking jobs and better lives, who governments are likely to rule are economic migrants.
Source: https://www.bbc.com