The Greek parliament has passed a law allowing migrants arriving in the country to be returned to Turkey.
The legislation is essential for the implementation of an EU-Turkey deal aimed at easing the uncontrolled mass movement of people into Europe.
On Monday, Turkey is due to receive its first migrants returned from Greece.
But there are warnings of a lack of preparation on both sides, while aid agencies are concerned migrants may be mistreated in Turkey.
Greece had to amend its laws for the deal to be possible and the bill was passed by 169 members of the 300-seat parliament.
Last year, more than one million migrants and refugees arrived in the EU by boat from Turkey to Greece, and Athens has struggled to cope.
Tens of thousands have been stranded in Greece after northern counties closed their borders.
Under the EU-Turkey deal, migrants arriving illegally in Greece are expected to be sent back to Turkey from 4 April if they do not apply for asylum or if their claim is rejected.
In return, Turkey will receive aid and political concessions.
At the scene: Mark Lowen, BBC News, Western Turkey
Two days before the first migrants are due back here in Turkey there is little sign of any preparation.
A field near the western town of Dikili has reportedly been earmarked for a registration centre but it remains empty.
Residents here have called a protest on Saturday against planned refugee camps.
Local officials are trying to calm tempers by suggesting those sent back here would only stay temporarily in Dikili before being sent to other areas of Turkey.
Meanwhile, boats are still attempting to cross - 160 migrants were caught by the Turkish coastguard near Dikili on Friday. Many more actually reached the Greek island of Lesbos.
The UN has called on Turkey and Greece to ensure safeguards are in place before returns begin, warning of "serious gaps" on both sides.
A report from Amnesty International says Turkey has been illegally forcing thousands of refugees back to Syria.
"In their desperation to seal their borders, EU leaders have wilfully ignored the simplest of facts: Turkey is not a safe country for Syrian refugees and is getting less safe by the day," said John Dalhuisen of the group.
Turkey is yet to respond to the Amnesty report but has denied sending back any refugees against their will.
The country has taken in 2.7 million Syrian refugees since the civil war began five years ago. Many live in camps near the border between the two countries.
Key points from EU-Turkey agreement
- Returns: All "irregular migrants" crossing from Turkey into Greece from 20 March will be sent back. Each arrival will be individually assessed by the Greek authorities.
- One-for-one: For each Syrian returned to Turkey, a Syrian migrant will be resettled in the EU. Priority will be given to those who have not tried to illegally enter the EU and the number is capped at 72,000.
- Visa restrictions: Turkish nationals should have access to the Schengen passport-free zone by June. This will not apply to non-Schengen countries like Britain.
- Financial aid: The EU is to speed up the allocation of €3bn ($3.3 bn; £2.3 bn) in aid to Turkey to help migrants.
- Turkey EU membership: Both sides agreed to "re-energise" Turkey's bid to join the European bloc, with talks due by July.
Meanwhile on the Greek island of Chios migrants broke out of a detention centre in protest against their planned deportation under the EU-Turkey plan.
Eight people were hospitalised on Thursday in a brawl between migrants at the port of Piraeus near Athens, where thousands are living in dire conditions.
Most of the migrants there are from Syria, Iraq and Afghanistan, and for weeks they have slept in tents or blankets out in the open with poor sanitation and little food.
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.