Photos have surfaced of overcrowded and “degrading” conditions in Iraqi detention centres used to hold thousands of men, women and children with suspected links to Islamic State.

Human Rights Watch (HRW) said on Thursday it had acquired rare photographic evidence of conditions falling short of the most basic international standards at three facilities in Nineveh province. HRW warned the situation could lead to the radicalisation of vulnerable prisoners.

In one photograph, taken at Tal Kayf prison, dozens of women and small children are so tightly packed into a cell that the floor is not visible and clothes and belongings are hung on the wall. In another, of a juvenile cell at Tal Kayf, there is so little room a sea of teenage boys are forced to sleep in the foetal position.

Women’s cell at Tal Kayf prison. Photograph: Human Rights Watch/Private

Detention centres, police stations and prisons across Iraq have been overwhelmed in the two years since the government declared victory over Isis.

HRW and other rights groups have received multiple reports the overcrowding has led to infections and disease as well as mobility health issues. At least four people have died in custody and two people have had legs amputated.

“Concerns around overcrowding don’t solely affect the detainees, but also the community as a whole,” said Lama Fakih, HRW’s acting Middle East director. “The authorities should ensure that the conditions in Iraq’s prisons do not foster more grievances in the future.”

The three pre-trial facilities named by HRW on Thursday, Tal Kayf, Tasfirat and Faisaliyah, were designed to hold about 2,500 people. They currently house about 4,500 people, including 1,300 who have already been tried and convicted and should have been moved to less crowded facilities in Baghdad.

Most are being held on terrorism charges under Iraq’s sweeping counter-terrorism legislation. None have access to lawyers and there is no clear legal basis for their detentions, HRW says, calling for the use of pre-trial detention as a last resort and the release of detained children in accordance with UN rules.

As well as longstanding concerns over inhumane prison conditions and unfair trials, rights groups have repeatedly accused Iraqi forces of unlawful interrogations and torture and of executing men and boys believed to be former Isis fighters, which could amount to war crimes.

“We documented these abuses two years ago and very little has been done to alleviate the situation,” said Belkis Wille, a senior Iraq researcher at HRW.

“As long as the policy is to detain anyone who may have assisted Isis, even if they were forced to, even if they were medical staff or clerks, this problem is going to persist. There is no discussion around national reconciliation or any alternative strategy.”

The situation in Iraq’s prisons could be set to worsen: Baghdad is in talks with the US to transfer and place on trial tens of thousands of suspected Isis fighters and their families from detention centres in Syria to Iraq for a multibillion-dollar fee.

Isis was defeated in its last stronghold, in Baghuz on the Syrian-Iraqi border, in March.

The thousands of international fighters and their families who are among the last remnants of the so-called caliphate pose a legal headache for their countries of origin, which are under pressure from the US to repatriate citizens for trial at home.

Conditions in Kurdish-run facilities in Syria for suspected Isis members are also dire. Al-Hol camp is home to 74,000 people, 65% of whom are children under the age of 12.