The U.N. Security Council unanimously adopted a statement on Thursday expressing “grave concern” about the sale of migrants as slaves in Libya, calling the slave markets “heinous abuses of human rights which may also amount to crimes against humanity.”

The statement urges “Libyan authorities” — a regrettably imprecise term, given how many governments, gangs, and warlords claim dominion over various parts of that ruined country — to comply with international law, “transfer all detainees to State authority” and “ensure full humanitarian access to detention centers.” The Security Council expressed appreciation for the Libyan Government of National Accord’s statement denouncing human trafficking and slavery. The Security Council statement adds:

Petr Iliichev (Russian Federation) stated that, although he had supported the statement due to his country’s concern over the reports of slavery, he regretted that his proposal to also condemn the circumstances that led to the chaos in Libya – the military intervention of 2011 – had not been considered. That intervention had led to such crimes being committed and had created the need for United Nations efforts to help restore stability to the country.

The slave market story exploded in November when CNN broadcast cell phone and hidden camera video of the Tripoli slave auctions, where migrants were sold off by smugglers who had been paid to slip them into Europe — an enterprise frustrated by improved Libyan and European coastguard coverage.

The Washington Postadditionally reported on migrants who found themselves “hoodwinked by smugglers and marooned in squalid Libyan detention centers.” The smugglers take advantage of Libya’s lawless status and lure migrants from across the region with promises of a good life awaiting them in Europe. Some of the migrants have been held for ransom by smugglers desperate to squeeze a little more profit from their surplus human cargo.

Efforts are underway to return some of the migrants trapped in Libyan camps to their countries of origin, but the process is off to a slow start. A group of 164 migrants was repatriated to Nigeria on Friday with the assistance of the European Union and the International Organization for Migration. 504 people were returned to Niger earlier in the week, plus 167 to Guinea. After the slavery story broke, the African Union announced plans to repatriate 20,000 migrants from Libya over the next six weeks. According to some estimates, there are currently a million migrants languishing in Libyan camps.

The Nigerian returnees told horrifying tales of their time in Libya. “If they lock you up in a room, you hardly eat, that’s number one. You’ll urinate there, you’ll defecate there and every morning, let me say three times a day, you will be severely beaten,” one migrant told the Associated Press. The beatings were meant to encourage migrants and their families to cough up ransom payments to the smugglers.

Another migrant, a 14-year-old girl, told authorities she lost count of the number of men who had used her for sex during her time in the camps. The Associated Press report includes more accounts of migrants who were sold as slaves, including young girls.

A major problem with the repatriation plan is that some of the migrants do not want to return home. As horrible as the Libyan camps might be, they still hope they will be allowed into Europe, and there are organizations demanding exactly that.

The Associated Press quotes Amnesty International excoriating the Europeans for blocking illegal immigration across the Mediterranean and creating the bottleneck of migrants in Libyan camps. Even the mass repatriation plan was criticized as a cynical, selfish scheme to send migrants home instead of allowing them to settle in Europe.

“Plans which overwhelmingly prioritize the ‘voluntary’ return of people now stuck in Libya to their country of origin without an effective system for assessing and meeting asylum needs or offering more resettlement places will end up as a mechanism for mass deportation,” said Director for Europe John Dalhuisen of Amnesty International.

The U.N. Security Council condemns human trafficking with some regularity, especially since conflict zones and mass refugee migrations over the past few years produced large displaced populations that could be easily preyed upon.

At roughly the same time last year, the Security Council issued a condemnation of human trafficking that prominently mentioned the capture and sale of slaves by the Islamic State, Boko Haram, Al-Shabaab, and the Lord’s Resistance Army. In that statement, the Security Council called for treating the victims of trafficking and sexual violence as victims of terrorism.