Doctors Without Borders (MSF) accused the British government of adding to the "appalling human cost" endured by refugees and migrants held in desperate conditions in Libyan detention centres.

The medical charity and relief agency called on the British government to end its support for the arbitrary detention of refugees in Libya after Foreign Secretary Boris Johnson publicly endorsed the Libyan coastguard last week.

MSF said its medical staff working at detention centres in Tripoli has documented men, women and children being held in inhumane conditions. Many of the detainees, the group said, were brought to the centres by the Libyan coastguard.

The coastguard, which has rescued hundreds of people but has also been accused of mistreating refugees, receives financial support from the UK.

Last week Johnson rejected claims by NGOs and aid groups that the Libyan coastguard had fired on boats off the coasts.

Johnson's visit to Libya came as Middle East Eye reported claims that Italian authorities were bribing Libyan militias linked to the coastguard. The bribes, sources in Libya claim, were aimed at ensuring the militias stop migrants and refugees setting out for Europe.

The British government is working with other European Union governments and officials in Libya to create a buffer zone for Europe.

Somebody else's problem?

However, the detention system in Libya is unregulated and chaotic, lacking basic standards and safeguards to prevent torture, sexual violence and ill-treatment, MSF said on Friday. Guards at the sites lack adequate training and often do not receive a regular salary, prompting fears of mistreatment.

Vickie Hawkins, MSF UK executive director, said: "The British government is happy to sweep the appalling human cost of its deterrence policies on migration under the carpet – anything to make this someone else's problem."

She added: "The reality is that UK policy is helping to trap thousands of people in Libya in these conditions. The foreign secretary can no longer remain silent on this issue. He has serious questions to answer on the harm caused by Britain's support for this abusive system and the role that it plays trapping people in Libya."

Libya has been in a state of crisis since the ousting of leader Muammar Gaddafi in 2011 by rebels and a NATO-led bombing mission backed by former British prime minister David Cameron. The intervention remains controversial in Britain, after an influential committee of MPs described it as an ill-conceived mission that helped fuel the rise of Islamic State in North Africa.

Aid groups say conditions in Libya's overcrowded detention centres are dire, and MSF said it treats more than 1,000 detainees every month for respiratory tract infections, acute watery diarrhoea, infestations of scabies and lice and urinary tract infections. MSF staff say the sites lack natural light and ventilation and suffer from food shortages.

The group says that it has documented children, babies and pregnant women held in detention centres, including a five-hour-old baby who was treated by MSF medics.

Stripped of human dignity

"Detainees are stripped of any human dignity, suffer ill-treatment and lack access to medical care," said Dr Sibylle Sang, a medical adviser to MSF.

She added: "Every day we see how much unnecessary harm is being caused by detaining people in these conditions, but there is only so much we can do to ease the suffering."

Johnson announced $11.6m in aid for Libya last week, including $5m to remove improvised explosive devices from areas where Islamic State has been pushed back, $1.3m towards a fund for critical infrastructure, $3.6m for supporting women’s participation in peacemaking and $1.7m in support for food and health care for refugees.

Aid agencies, including Oxfam, welcome investment but said the UK supports turning people back to Libya when they are trying to flee violence and conflict.

MEE contacted the British Foreign Office for comment but had received no reply by time of publication.