In 2015 and 2016, more than one million migrants reached Greece from Turkey, most of them making their way to wealthier countries like Germany.

To stop this, the European Union pledged more than $6 billion to Turkey. In return, Turkey tightened up its border restrictions — and agreed to take back every migrant who subsequently landed in Greece.

Turkey did cut migration flows to Europe drastically, but only a small proportion of migrants who continued to land in Greece have been sent back. Migrants still have the opportunity to apply for asylum in Greece, or for relocation to other European countries, and many do so successfully. The Greek asylum system operates independently and is not beholden to the political agreement between the European Union and Turkey.

Meanwhile, migrants reaching Italy from Libya, another major gateway to Europe, are not returned because the country is still at war and does not recognize the 1951 convention.

People trying to reach Spain through its enclaves in North Africa are often forced back to Morocco without being given the chance to apply for asylum. But those who manage to cross the border into the enclaves undetected are usually allowed to lodge an asylum claim in Spain, though they are often sent back once their applications are rejected months later.

Within Europe itself, migrants must technically seek asylum in the first country they reach

In theory, migrants are supposed to lodge an asylum claim as soon as they reach one of the 28 member states of the European Union. Those who don’t are liable to be returned to the country where they first entered the bloc — usually Greece, Italy or Spain — because European Union members theoretically trust one another to uphold the 1951 convention and treat refugees fairly.

But again, the system doesn’t quite work like that in reality. Sometimes it’s hard to prove that applicants passed through Greece on their way to, say, Germany. And in recent years, countries like Germany and Sweden have suspended returns to some members of the European Union, like Hungary and Greece, because of concerns about the fairness of their asylum systems.