Is the migrants' deportation from Greece legal?

More migrants and refugees are being sent back from Greece to Turkey.

For more than a year now, hundreds of thousands of people have been boarding overcrowded boats provided by smugglers along the Turkish coast.

The refugees and migrants have braved possible drowning. Some thousands did not make it.

Now, some of these travellers who reached Greece safely find themselves on boats once again. This time, back to Turkey. More than 300 people have been deported from Greece, as part of a deal between the European Union and Turkey.

On Friday, the latest batch of about 120 people was ferried from the Greek island of Lesbos to the Turkish port of Dikili. Protesters who oppose the deportations jumped into the water near Lesbos to try to stop it happening.

They were not alone in their dissent. The United Nations and several rights groups have raised concerns about the EU-Turkey deal, calling it inhumane.

So, what is the legal basis for sending refugees back to Turkey? And how will the deal with the EU play out in practice?