GENEVA (Reuters) - The European Union’s support for the Libyan coast guard is leading to the arbitrary and indefinite imprisonment of migrants in “inhuman” conditions, the U.N. human rights chief said on Tuesday.

Zeid Ra'ad Al Hussein, U.N. High Commissioner for Human Rights arrives at the 36th Session of the Human Rights Council at the United Nations in Geneva, Switzerland September 11, 2017. REUTERS/Denis Balibouse

The EU anti-trafficking mission Sophia has helped train Tripoli’s coast guard, while Italy has supplied it with four patrol boats. Italy also has sent millions of euros and a navy repair ship to fix Libya’s marine fleet.

So far in 2017, the Libyans have intercepted almost 20,000 migrants at sea, according to the International Organization for Migration. After being taken from the boats, they are brought to land and put in “detention centers” that were visited by United Nations personnel.

“Monitors were shocked by what they witnessed,” High Commissioner on Human Rights Zeid Ra’ad Al Hussein said in a statement.

They saw “thousands of emaciated and traumatized men, women and children piled on top of each other, locked up in hangars with no access to the most basic necessities, and stripped of their human dignity,” he said.

Some 20,000 people are now being held in facilities controlled by Tripoli’s migration department, up from 7,000 in September, the U.N. said in a statement.

While U.N. agencies and other humanitarian groups have access to them and seek to provide health care and some food, Zeid said it was not enough because “the EU and its member states have done nothing so far to reduce the level of abuses suffered by migrants”.

Just a day ago, European and African ministers repeated a pledge to try to improve conditions for migrants in Libya, and on Saturday Italian Prime Minister Paolo Gentiloni hailed Italian immigration policy.

“Italy is the only country in Europe with a decent migration policy,” Gentiloni said. “We’re proud because we don’t build walls or close ports.”

But it was Italy that struck a deal with the U.N.-backed Tripoli in February, which was endorsed by the whole of the EU, aimed at blocking migrants in Libya, much as the EU deal with Turkey did last year.

That agreement, combined with the support for the Libyan coast guard, has brought migrant sea arrivals down dramatically in recent months.

This year there have been 115,000 sea arrivals in Italy, down 31 percent from last year, official data from Italy’s Interior Ministry show. In October alone arrivals dropped by 76 percent from a year earlier.