A migrant rests outside the Moria migrants camp on the Greek island of Lesbos on June 19, 2016. U.N. chief Ban Ki-moon said on June 18, 2016, that the "detention" of migrants who arrived in Greece since March should cease immediately. (Angelos Tzortzinis/AFP/Getty Images)

The human traffickers who brought a million desperate asylum seekers through Turkey to the Greek islands have been stopped. Where once thousands a day were smuggled by the mafias on cheap rubber rafts, very few are making the trip this summer.

To shut down the Eastern Mediterranean route, countries such as Macedonia, Hungary and Bulgaria acted independently and threw up razor-wire fences along their southern borders, defying Europe’s central authority in Brussels.

The European Union itself struck a deal that threatens to send the migrants back to Turkey from Greece en masse.

It wasn’t pretty.

Human rights activists called it cruel.

But it worked.

The unimpeded flow of humanity, dominated by Syrians, Iraqis and Afghans, to Europe is over, at least for now. Arrivals in the Greek islands are down 97 percent.

The repercussions of the unprecedented maritime migration in the Eastern Mediterranean is still playing out across Europe, especially in Britain, whose citizens voted last week to leave the European Union, in part, because of fears that more immigrants would reach the British isles.

No country has been more overwhelmed than Greece and no place in Greece more than here on the island of Lesbos, which saw 600,000 war-weary people pass through in the past 18 months.

No more.

Now the open turnstile toward a new life in Germany or Sweden has turned into Europe’s waiting room.

Migrants rest at a lunch room outside the Moria migrants detention camp on the Greek island of Lesbos on June 19, 2016. (ANGELOS TZORTZINIS/AFP/Getty Images)

Mohammed, a 22-year-old Iraqi from Mosul stuck at the Moria camp on Lesbos, compared his life to the Eagles song “Hotel California.”

He hummed a few bars. He got the lyrics mostly right.

“You check in but you never check out,” sang Mohammed, who, like most asylum seekers, declined to give his full name because he was criticizing the system charged with deciding his fate.

Some 42,000 asylum seekers are stuck in grim camps on the Greek mainland, according to the United Nations.

An additional 8,000 are spread throughout the Greek islands, with about 3,000 on Lesbos.

These are essentially the left-over people who arrived in Greece after the E.U. deal with Turkey went into effect March 20.

Fewer than 500 of these new arrivals in all of Greece have been sent back to Turkey, although the threat alone may be largely responsible for the steep downturn in trafficking.

The migrants and refugees appear to have made a financial calculation: Why spend $1,000 on a smuggled voyage only to be sent back later after enduring a few squalid months in a dirty camp on Lesbos?

“I would not have come to this place to rot,” said Akash, 24, from Bangladesh, who traveled here with two cousins. “It cost us everything we had.”

Asked whether he thought he would get off the island and be given asylum in Greece or be relocated to another European country, he shook his head and began to rub his eyes.

The Moria camp, where the majority of asylum seekers are being detained, is notorious.

Human Rights Watch visited the Reception and Identification Center in May and found chaotic conditions: toilets flooded, poor food, the overcrowded facility filled with angry, sometimes drunken men, fighting over their spots in lines, harassing the women and trying to enter their tents.

On Lesbos and the other islands, riots have broken out, with fires set as groups of foreign nationals — Afghans vs. Pakistanis vs. Syrians — set upon each other while the police withdrew to the safety of their fortified freight containers.

In his report, Bill Frelick, a director at Human Rights Watch, called the conditions “unfit for animals.” Amnesty International issued its own condemnation.

Suha, 33, is a Palestinian refugee from Syria. She arrived on Lesbos in early April, spent a few nights at the Moria hot spot and then was transferred to another facility, called Kara Tepe, run by the local municipality. This was previously known as “ the good camp.”

“At the beginning it was okay, but as Kara Tepe became more crowded, the problems began,” Suha said.

“The men tried to pull my daughter away from me. She is only 14 years old,” Suha said. “There were too many people, too many angry people. Stealing. Going crazy.”

Suha and her children were transferred to the Silver Bay Hotel, now run as shelter by Caritas, a Catholic relief agency. “I would stay here forever; I don’t care,” she said.

Suha and her children have their own room — there is a full-service cafeteria, language classes, even yoga.

But no certainties. Only a few of the 200 asylum seekers at the Silver Bay Hotel — which hosts the most vulnerable refugees — have been permitted to relocate to other countries in Europe. The family reunification process is also bogged down; it will take months before decisions are made.

“I suspect there will be camps here a year from now,” said Tonia Patrikiadoy, manager of the Caritas facility.

In all of Greece, only about 1,700 asylum seekers have been relocated to E.U. countries that promised to take them.

“They don’t care. I hate Europe,” said Rowaida, 20, an Afghan from Herat, who worked in a beauty salon.

She sat outside the Kara Tepe camp, charging her phone.

“I can’t go forward and I can’t go back,” Rowaida said.

She said that the refugees who rushed to get into Europe before the borders closed and the deal was struck with Turkey to send some back, “they were the smart ones.”

“We were too slow, too late,” she said.

Rowaida complained that authorities only began to clean up the Moria camp in the days before U.N. Secretary General Ban Ki-moon came to visit two weeks ago.

A representative in Lesbos for the U.N. High Commissioner for Refugees said the conditions in the camps did improve in June, mostly because the Greek police began issuing permits for the asylum seekers to leave the closed facilities. They are not allowed to leave the island, but they can go into the main town of Mytilene.

On his visit here, Ban said that although the smuggling of people to Greece has stalled, the central Mediterranean route remains in use — and is deadlier than ever.

That route brings sub-Saharan Africans through Libya to Italy. A spokesman for the European border agency Frontex said he could count the number of Syrians who arrive in Italy on one hand. The top three countries of origin are Nigeria, Gambia and Somalia — and the overall numbers there are the same as last year. What has changed is the cost of the smuggling.

Almost 3,000 people have died or are missing at sea on this route this year.