Outside Europe, the European Union has courted authoritarian governments in Turkey, Sudan and Egypt, while Italy has negotiated with warlords in Libya, in a successful effort to stem the flow of migrants toward the Mediterranean.

Inside Europe itself, those who still make it to the Greek islands — about 23,000 have arrived this year, down from 850,000 in 2015 — must now stay at camps like Moria until their cases are settled. It can take as long as two years before the asylum seekers are either sent home or move on.

“I have been in some pretty horrendous camps and situations,” said Louise Roland-Gosselin, who is head of mission in Greece for Doctors Without Borders and spent five years in crisis zones in Congo and South Sudan. “I have to say that Moria is the camp in which I’ve seen the highest level of suffering.”

The group’s lead psychiatrist on Lesbos, Alessandro Barberio, said he had never seen such overwhelming numbers of severe mental health cases. Of the roughly 120 people his team has the capacity to treat, the vast majority have been prescribed anti-psychotic medication.

“Moria has become a trigger for an acute expression of psychosis and post-traumatic stress disorder,” Dr. Barberio said.