An African migrant living in Greece raises his chained hands during a protest Saturday in Athens against recent reports of migrant slavery in Libya. (Costas Baltas/Reuters)

After years of ignoring the sale of human beings in Libya, leaders from Europe and Africa have been making a grand show of shock and indignation.

After CNN released a report about migrants being sold into slavery while attempting to cross the Mediterranean, French President Emmanuel Macron rushed to denounce the Libyan government. French Foreign Minister Jean-Yves Le Drian threatened Tripoli with sanctions if the country did not move quickly to investigate the abuses. Nigerian leader Muhammadu Buhari said it was appalling that “some Nigerians [in the footage] were being sold like goats for a few dollars.”

As many observers have noted, however, slavery existed in Libya long before the CNN report. Amnesty International has been sounding the alarm on human trafficking there for more than two years. Earlier this year, the group recounted the story of a man from Burkina Faso who was sold to traffickers in Libya. Last year, photographer Narciso Conteras documented the harrowing conditions for African migrants in the country. “Libya has become a trafficking market where people are bought and sold on a daily basis,” he noted.

On a visit to The Post on Tuesday, Libyan Prime Minister Fayez al-Serraj pulled no punches when discussing migration and slavery.

“We are very concerned by these claims, if they are true,” he said. “For us, slavery is totally against our values. We will hunt them down, those who are responsible. But it’s unfair to put all the blame on Libya alone.” He specified that the countries of origin, destination and transit all bear a joint responsibility for the migrants.

There are about 500,000 migrants from various African countries in Libya. According to Serraj, only 20,000 of them are in official detention centers. Libya has been slammed by international human rights groups for the poor conditions in the centers.

“Europe has a responsibility and the ability to absorb and accept more migrants and to try to support legal migration,” Serraj noted. “I find it puzzling that some European countries don’t accept the migrants, and then they blame us for the conditions in which the migrants are living, where we have total chaos.”

The Italian government might agree with Serraj. This year alone, Italy received 84,830 migrants, the overwhelming majority of them from sub-Saharan Africa. Italy has pressured the rest of Europe to accept more migrants. Prime Minister Paolo Gentiloni said earlier this year that “Italy has mobilized to deal with the flows of migrants,” adding that Europe must help if it “wants to stay faithful to its own principles, own history, own civilization.”

But as long as European nations refuse to create safer and legal means for migrants to reach Europe, people will continue to suffer. To date, Europe’s efforts to cope with migration have aimed at keeping migrants away — as shown by its controversial deal with Turkey to keep migrants and refugees from going to Europe. In 2015, the European Union established a $2.1 billion fund to cooperate with African nations such as Niger, Mali, Senegal and Nigeria, as well as Eritrea and Sudan, mainly by promoting local development in order to prevent migration, but also by training and equipping local security forces.

Europe helps to train and fund the Libyan Coast Guard to intercept migrants and return them — back into appalling conditions in the detention camps and right back into the hands of traffickers. U.N. human rights chief Zeid Ra’ad al-Hussein has called Europe’s support of the Libyan coast guard “inhumane.”  When asked about this, Serraj said that Libya needs more equipment to tackle the migrant crisis, and that it had requested a partial lifting of a 2011 arms embargo to this end. “We are now faced with traffickers in the sea who are highly equipped, and we don’t have the sufficient capacity to combat them,” he said. “It is not fair to have a situation where our coast guards are handcuffed.”

So what about the African countries of origin? While it is easy to place blame  solely on Europe, African governments, aware that their own citizens were enduring terrible abuse in Libya and southern Europe, have largely stood by and watched. But the CNN report has left African officials scrambling. The African Union offered a statement condemning the abuses in Libya and has reportedly announced a plan to bring 20,000 migrants home from there. Rwanda has offered to accept about 30,000 migrants who are stranded on Libyan territory. Nigeria, the source of a large share of the Africans trying to reach Europe through North Africa, has begun repatriating its citizens.

Libya has also been receiving offers of help from unwelcome corners. Erik Prince, the founder of the private security company Academi (previously known as Blackwater), has offered to send a private mercenary force to stop, detain and relocate hundreds of thousands of African migrants — and on the cheap.

Ferraj said that his government had no knowledge of any such offer. “We heard about this in the media, just like you did,” he said. “But at the end of the day, we did not receive any official request to support.” He said that it is not official Libyan policy to use private contractors.

Libyan Ambassador to the United States Wafa Bughaighis said that Libya did not take Prince seriously: “We all know what Blackwater did in Iraq, and it has the worst reputation ever. The government will never deal with them.”