Refugees who attempt to make the perilous journey from the Middle East to Greece in search of a better life could soon be turned back to Turkey, a country already overwhelmed with hundreds of thousands of people who have fled the Syrian Civil War and whose camps are often underserved. The terms of a new agreement between Turkey and the European Union will force refugees to register as such with Turkish authorities and apply formally through the United Nations for resettlement in Europe. But this process could take months, or even years, human rights groups say. Meanwhile, refugees will have to live in either government-sponsored camps or with friends in their homes.

“This is a dark day for the Refugee Convention, a dark day for Europe and a dark day for humanity,” Amnesty International said in a statement after the new deal was announced Friday.

However, Turkish officials said the pact was the only option to resolve the refugee crisis.

“At a time when Turkey is hosting 3 million, those who are unable to find space for a handful of refugees, who in the middle of Europe keep these innocents in shameful conditions, must first to look at themselves,” President Recep Tayyip Erdoğan said on Turkish television Friday.

Contributing to the length of the process to be used by refugees who are returned to Turkey under the new agreement is their required registration with the U.N. This mandate alone could take a long time because the many refugees who need to live in camps will nonetheless have to find their way to U.N. offices to sign the requisite paperwork. And what will follow is a series of interviews with officials who will require refugees to prove they need to be resettled in Europe.

In many cases, a successful asylum application requires evidence of persecution, which can be difficult to produce. Even when asylum seekers can produce such evidence, officials evaluating their claims may have their own biases. And, sometimes, evidence is employed improperly. Amnesty International studied a set of asylum claims and found that in most cases judges did not make proper use of the evidence available — and even small inconsistencies were enough to lead to the dismissal of applications.

The U.N. said in January it would devote additional resources to resettling Syrian refugees living in Turkey.

“We will do whatever we can to help the Turkish government find additional resources for people who are living here under temporary protection to make their lives as good as we can,” Filippo Grandi, the U.N. High Commissioner for Refugees (UNHCR) said in Istanbul in January. “We will work on other aspects as well. We will work on more resettlement opportunities,” he said.

Since the onset of the Syrian refugee crisis, Turkey’s policies for assisting and managing its refugee population have been very different than those implemented in Jordan and Lebanon.

Turkey has followed an open-door policy since the beginning of the Syrian crisis. To date, it has spent more than $5.5 billion of its own money to accommodate about 1.7 million registered Syrians in 22 government-run camps.

But Turkey does not grant Syrians official status as “refugees.” Instead, it labels them as “guests” who enjoy only temporary protection. Turkey considers only those migrating from Europe as “refugees.” It is still unclear under the new deal whether those refugees returning from Greece to Turkey will be deemed “refugees” or “guests.” The distinction could have a significant impact on their asylum applications.

Although its details haven’t been fully fleshed out, the new pact will implement a system that is supposed to ease the biggest migration crisis Europe has faced since World War II by cracking down on smugglers.

“I have no illusions that what we agreed today will be accompanied by further setbacks. There are big legal challenges that we must now overcome,” said German Chancellor Angela Merkel in a statement Friday. Merkel’s own policies have historically been migrant friendly, although she said she backs the new deal. “I think we’ve reached an agreement that has an irreversible momentum, and it was very important for me that we managed to agree all that among the 28 [EU members] today.”