Amnesty International on Tuesday accused Italy and other EU governments of being “knowingly complicit” in horrific abuses of migrants in Libya, warning of legal action against them at European and UN rights institutions.

The charges by the London-based rights group mark a ratcheting up of activist and other accusations against the European Union’s policy of aiding the UN-backed government in Tripoli in order to stop migrants from travelling to Europe. “European governments are knowingly complicit in the torture and abuse of tens of thousands of refugees and migrants detained by Libyan immigration authorities in appalling conditions in Libya,” Amnesty said in a report.

European governments are “actively supporting a sophisticated system of abuse and exploitation of refugees and migrants by the Libyan coastguard, detention authorities and smugglers in order to prevent people from crossing the Mediterranean,” Amnesty said. “The various EU governments, Italy in particular, know full well that this is going on,” Amnesty’s Europe Director John Dalhuisen told AFP in Brussels. “This system puts Italy in particular very much in breach of its international obligations,” especially on the prohibition of torture, Dalhuisen added.

Italy, the main landing point for migrants sailing from Libya, has of all the EU governments “the most sophisticated set of arrangements” with Libyan Prime Minister Fayez al-Sarraj’s government to detain migrants, he said. Dalhuisen said Amnesty and other people he did not name are preparing to take the charges to the European Court of Human Rights in Strasbourg, the UN’s Committee Against Torture and its Human Rights Committee. The Amnesty report amounts to “the presentation of an argument that will subsequently provide the material for us and I’m sure others to litigate,” he said.

Amnesty, citing testimony from dozens of migrants, said officials in the Libyan coastguard, trained and equipped by European governments, notably Italy, “are known to operate in collusion with smuggling networks and have used threats and violence against refugees and migrants.” Dalhuisen said the Libyan authorities, militias, armed groups and smugglers are “often working seamlessly together for financial gain.”

In Libya, many migrants are detained, tortured, and even killed, according to the U.N. International Organization for Migration (IOM). At least 20,000 migrants are being detained in Libya, which is the main gateway for Africans to reach Europe, according to the IOM. Images broadcast by CNN earlier this month appeared to show migrants being auctioned off as slaves by Libyan traffickers, sparking outrage in Europe and anger in Africa. Numbers of detainees swelled after boat departures for Italy from the smuggling hub of Sabratha were largely blocked this year. The EU, U.N. and African Union agreed last month to an emergency plan to dismantle people smuggling networks and repatriate stranded migrants in an effort to ease a human rights disaster in Libya.