Haftom, a 32-year-old Eritrean dentist, used to tell a joke that went like this: “God was watching the globe and saw Eritrea was green. ‘How did this country become so green,’ he wondered, and went to investigate. But when he got there he saw the green was overcrowded militias.”

Of course this was black humour. Like tens of thousands of others, Haftom fled Eritrea, one of the most isolated dictatorships in the world. He wanted to get away from brutal leaders who controlled every aspect of his life, from his profession and his salary to where he could live and what he could speak about. Friends described him as a “quiet, smart” man, who had eventually despaired of any chance that things would get better.

Some have stopped speaking, forgotten their families, sit crouched in a corner and wet themselves from trauma

By February 2018, Haftom had survived smugglers in the Sahara and police in Sudan. He boarded a flimsy rubber boat on the Libyan coast and spent 12 hours at sea before being caught and brought back again by the Libyan coastguard. Like tens of thousands of others who’ve gone through the same EU-approved ordeal, he was then locked up indefinitely. He died days before Christmas.

Saturday marked two years since Italy, backed by the EU, did a deal to spend tens of millions of euros funding the Libyan coastguard, which intercepts boats heading for Italy and returns refugees and migrants to a war zone. While much of the justified outrage against European migration policies has been caused by the criminalisation of search-and-rescue operations in the Mediterranean, the deadliest sea route in the world, no one seems to be tracking the number of refugees and migrants dying in horrific conditions after being sent back to Libya as a direct result of EU policy.

Haftom, the 32-year-old Eritrean dentist who died in detention after being sent back to Libya

For the past six months I’ve been in daily contact with detainees in nine different detention centres who use hidden phones to reveal what’s going on at huge risk to themselves. EU leaders continue to promote the idea that arrivals in Europe and deaths at sea are dropping. But what about the untold suffering of thousands of men, women, and children, whom the EU has effectively turned away?

They speak of going days without food and of drinking toilet water to survive. Some have stopped speaking, forgotten their families, sit crouched in a corner and wet themselves from trauma, according to witnesses. Couples are separated – some of the roughly 640 detained children are held with their mothers, though those over 14 are kept in adult cells. In one centre, Triq al Sikka, infected detainees are locked with others in a dark room and have been repeatedly left without tuberculosis medication, in one case for more than a month. In October, a 28-year-old Somali set himself on fire there after saying he saw no other way out.

In early January dozens of refugees and migrants, brought by the coastguard to the Libyan port city of Khoms, were forced back to smugglers by Libyan guards in Souq al-Khamis detention centre. They now risk torture if they can’t raise an the $5,000 ransom that has already been demanded.

More than 40 detainees in just one centre say they’ve been imprisoned for more than a year, and have no hope of help any time soon. The UNHCR says it’s aiming to evacuate 2,500 people in 2019 but needs countries to step up and offer resettlement places. Even if this target is met, it will be a small percentage of the 15,000 who were returned to Libya last year after trying to cross the Mediterranean.

Abdulaziz, the Somali who set himself on fire at the Triq al Sikka detention centre in October

Last month, both Human Rights Watch and Amnesty International released reports condemning the conditions refugees are being held in. On Friday, more than 50 major organisations, including Oxfam and Doctors Without Borders, wrote an open letter, saying: “EU leaders have allowed themselves to become complicit in the tragedy unfolding before their eyes.”

Six months ago, any pretence that Libya was a safe place to send refugees back to crumbled completely, when the worst fighting in years broke out in the capital, Tripoli. Refugee detainees were ousted from some detention centres and made to move weapons or pack bullets. In September, Haftom was one of hundreds of refugees and migrants transported to a detention centre in Zintan, far outside the capital, ostensibly because it was more secure.

At least eight people have died at that centre since mid-September, according to detainees. One was a five- or six-year-old boy who died from appendicitis because he didn’t get the necessary medical care.

“It is hard to talk about this life. I am also losing hope. Please share this to the world and tell [them] our problems before many lives [are] gone,” an Eritrean still imprisoned there messaged me this week.

Though friends believed Haftom developed a heart problem, it wasn’t clear what the final cause of his death was. “So many people [are] getting ill,” messaged his fellow detainee. “They take them and [put] them in one house and they don’t give them any medication.”

The Eritrean also said Haftom knew he had reached the end. “Everyone in here [thinks that] if he gets sick. No one is thinking that they are going to be OK. They are thinking only it’s our turn.”

• Sally Hayden is a journalist focusing on migration and humanitarian crises