All day and night they listened to the wailing of hungry children.

Here, in a freezing immigration detention facility somewhere in the Rio Grande valley of south Texas, adults and children alike were fainting from dehydration and lack of food.

Sleep was almost impossible; the lights were left on, they had just a thin metallic sheet to protect against the cold and there was nothing to lie down on but the hard floor.

This is the account of Rafael and Kimberly Martinez, who, with their three-year-old daughter, had made the dangerous trek from their home on the Caribbean coast of Honduras to the US border to ask for political asylum.

“The conditions were horrible, everything was filthy and there was no air circulating,” Kimberly Martinez told the Guardian of the five days the family spent cooped up in one facility they – like tens of thousands before them – referred to as “la hielera”: the icebox. Her husband added: “It’s as though they wanted to drain every positive feeling out of us.”

They knew, from following the news, that their ordeal of escaping gang violence back home and trekking across desert terrain at the height of summer would not end when they reached the United States.

What they did not expect, though, were days of hunger, separation and verbal abuse that they said they endured at the hands of federal immigration officials.

‘Caged up like animals’

All they were given to eat, they said, were half-frozen bologna sandwiches, served at 10 in the morning, five in the afternoon and two in the morning, and single sugar cookies for their daughter. What water they were given had a strong chlorine taste – a common complaint – and upset their stomachs.

The Martinezes (not their real name) were among dozens of asylum-seekers the Guardian interviewed in the border city of McAllen recently after they secured their provisional release from federal custody – with black electronic monitors fastened tightly around their ankles – and just before they continued their journeys by bus to the homes of US-based sponsors to await court hearings on their statuses.

The Guardian sat in with a team of volunteer doctors and nurses administering emergency medical care and listened as family after family gave jarringly consistent accounts of what they described as grim conditions in a variety of border detention facilities – conditions that have grown only grimmer since the advent of Donald Trump’s “zero tolerance” immigration policies.

Activists in Los Angeles protest Donald Trump’s immigration policies, 30 June. Photograph: Mike Nelson/EPA

Officials said the allegations made by families about their experiences in detention did not equate with what they knew to be common practice and they insisted detainees were treated with dignity and respect.

The “hieleras”, or iceboxes, asylum-seekers said, were overcrowded, unhygienic, and prone to outbreaks of vomiting, diarrhea, respiratory infections and other communicable diseases. Many complained about the cruelty of guards, who they said would yell at children, taunt detainees with promises of food that never materialized and kick people who did not wake up when they were expected to.

At regular intervals, day and night, the Martinezes, and many others, said guards would come banging on the walls and doors and demand that they present themselves for roll call.

If they talked too loudly, or if children were crying, the guards would threaten to turn the air temperature down further. When the Martinezes gathered with fellow detainees to sing hymns and lift their spirits a little, the guards would taunt them, or ask aggressively: “Why did you bother coming here? Why didn’t you stay in your country?”

“Many of these agents were Latinos, like us, but they were people without morals,” Rafael Martinez said, his voice choking with tears. “There we were, caged up like animals, and they were laughing at us.”

More jaundiced by the day

When three-year-old Jenny Martinez came down with a bad case of the flu, she and her mother were taken to a hospital where, they said, they were left waiting for hours with nowhere to sit or lie down, and no blankets, before receiving medication. Back in the detention facility, they were put in isolation and even Rafael was denied access to them.

Kimberly noticed that her daughter, like many of the detainees, was growing more jaundiced by the day for lack of vitamins or fresh air or sunshine. The toilets were filthy – with no seat covers and no toilet paper – and Kimberly observed that staff members did not throw out the crinkly blankets when detainees were moved or released; they simply passed them along to new arrivals.

Officials at various agencies often question the reliability of such accounts and say they cannot respond to individual cases without knowing more about the specifics than the immigrants and their lawyers, if they have them, are generally able or willing to disclose.

The Guardian collected the testimony of dozens of people – many interviewed directly, and others whose accounts were recorded by members of the medical team – and found broad corroboration of the types of conditions described by the Martinezes from half a dozen people or more for each of the types of tough treatment mentioned.

A CBP photo released in June shows children resting at the McAllen central processing facility. Photograph: Handout/US Customs and Border Protecti/Zuma Wire/Rex/Shutterstock

Not all facilities were equally bad. Many of the families said their worst experiences were at facilities where they were first housed and processed after being apprehended. It was not clear from their descriptions – and from conversations with federal officials – if these “hieleras” were border patrol outposts or Ice (Immigration and Customs Enforcement) detention centers.

Most of the families were subsequently transferred to a building they called “la perrera” – literally, the dog pound – that appeared to correspond to the border patrol’s central processing center in McAllen, a low-slung industrial warehouse that is the largest facility of its kind in the American south-west, where they said the temperatures were warmer, the staff was kinder, they had burritos and apples instead of frozen sandwiches and they were at last allowed to shower.

Fleeing gang violence

The numbers of migrants landing in federal detention have been relentless since the advent of “zero tolerance” in April, as families continue to flee gang violence in Honduras, El Salvador and Guatemala in particular.

Staff at a Catholic Charities respite center in McAllen, where released detainees are offered food, showers, fresh clothing and medical attention before they continue on their travels, said they had expected to see the numbers drop from a high of about 300 people per day in May and June – the period when parents and children were being separated as a matter of policy – to about 60 or 80, but instead they were still seeing close to 200 people being dropped at a nearby bus station each afternoon.

Many migrants arrive in the United States already weak from their journeys and traumatized by violence at home.

What awaits them in immigration detention facilities, though, according to civil rights lawyers and doctors who have examined them, only retraumatizes them and raises disturbing questions about the US government’s willingness to adhere to its own guidelines and to a flurry of court orders that have, over the past two years, mandated more humane treatment of those in its care.

The Trump administration’s ‘zero tolerance’ approach has triggered a flurry of litigation. Photograph: Robyn Beck/AFP/Getty Images

Facilities like the McAllen processing center were not designed to hold detainees overnight, and they have not been adapted as the demands placed on them have ballooned over the past decade. A series of memoranda and guidelines going back to 2008 and updated in 2015 say that detainees should not be held more than 72 hours and should have access to toilets, toiletries, potable drinking water and medical care.

Most of the interviewees in McAllen reported being held between three and seven days. Some accounts – provided first-hand by one former detainee and secondhand by a number of others – indicated that some people are held for 10 days or more.

They were not given mats to sleep on, or toothbrushes or toothpaste, despite a 2016 federal court order mandating these basic amenities.

Many – particularly men – said they had not even received blankets. New litigation filed this summer, based on accounts similar to those collected by the Guardian, has prompted a federal judge in California to order the appointment of a retired immigration judge to investigate conditions in detention centers with a view to mandating further changes.

‘It’s difficult to know who is doing what’

Many of the complaints about immigrant detention centers predate the Trump administration.

The advent of “zero tolerance” has, however, greatly increased pressure on the system, forcing federal officials to improvise solutions, and triggered an unusually large flurry of fresh litigation. Federal officials uncomfortable at the reports of mistreatment say it is very difficult to track who is doing what, especially since immigrants making the complaints do not know where exactly they were being held, or by whom.

“We’re talking about so many people – border patrol, Ice, contractors, medical personnel – it’s difficult to know who is doing what,” one federal official told the Guardian on condition of anonymity.

Many immigration experts, meanwhile, say they see a disturbing new tendency on the part of the Trump administration to disregard the rules, including explicit court orders, and to discourage officials lower down the chain of command from sitting down with their critics and attempting to solve problems before they get to court.

Last Thursday, for example, the administration announced it would no longer abide by a 20-year-old court settlement obliging the government to release children from detention after 20 days.

“I’ve been doing work with detainees for 20 years, and the biggest change in my mind is the government’s attitude of impunity,” said Holly Cooper, a law professor at the University of California at Davis who is suing the government over the administration of psychotropic drugs to immigrant children at a juvenile detention center near Houston.

“Before, I could sit down with government officials and they would at least hear me out as I strived to push the needle toward something more humane … Now there’s a total kibosh on talking to civil rights lawyers.”

At the border, the upshot of these changes is a panoply of shocking experiences inflicted on families who, in many cases, have fled in terror from their homes and are betting their future on what is an increasingly long-shot chance at being granted asylum in the United States.

The Martinezes left Honduras after Rafael’s father, sister and brother-in-law were killed by local gangs and word went out that they were after him too. Another Central American man interviewed by the Guardian had a scar running across his face from a machete blow.

Many interviewees described a sense of humiliation as US officials ordered them to remove their belts, shoelaces and long-sleeved shirts (all considered potential suicide risks) and pushed them into overcrowded chain-link cages.

Another image released by CBP in June shows detainees in McAllen. Photograph: Handout/US Customs and Border Protection/AP

Doctors and nurses who treated the asylum seekers after their release said they saw a lot of boils and skin rashes, attributable to the lack of hygiene, and severe constipation, attributable to dehydration and poor food intake.

Almost everybody who came through the clinic attended by the Guardian, run by a San Antonio-based group of volunteer doctors, nurses and social workers called Sueños sin Fronteras (Dreams without Borders), complained of flu symptoms or respiratory problems or both. Many of the ex-detainees said they had been forced to abandon their medicines – as well as clothing and other possessions – when they were released from custody.

Stories of medical negligence have also circulated. An HIV-positive Guatemalan woman who came through in July told one of the Sueños sin Fronteras team she had had her medicines taken away as soon as she entered detention and was kept in isolation away from her young child for five days.A five-year-old Guatemalan girl with appendicitis went undiagnosed for days at the McAllen processing center – despite repeated entreaties for help from her mother – and almost died when the appendix ruptured.

A group called Immigrant Families Together told the Guardian that a four-year-old boy who arrived in the United States with a broken femur had been given only mild pain medication at the Texas detention facility where he was held and ended up undergoing orthopedic surgery after his release.

While deaths remain relatively rare, a recent Human Rights Watch report found that more immigrants had died in detention in 2017 than in any year since 2009. It deplored evidence of “subpar and dangerous practices including unreasonable delays, poor practitioner and nursing care, and botched emergency response”.

‘We treat those in our custody with dignity and respect’

The Department of Homeland Security has continued to defend its practices in response to such public reports and also in court.

A Customs and Border Protection (CBP) spokeswoman said she “strongly disagrees” with the allegations presented in this piece. “The alleged incidents do not equate to what we know to be common practice at our facilities. We treat those in our custody with dignity and respect,” the CBP said.

CBP questioned whether the “hieleras” – the icebox facilities referred to by the detainees – were in fact run by its sister agency Ice. But Ice, in a statement of its own, said it did not have a detention facility in McAllen and that “previous reports have shown that [the terms ‘hielera’ and ‘parrera’] are used in reference to CBP facilities”.