The photograph of the toddler’s T-shirt tells a story. Its grey and white stripes are splattered with large blotches of dried blood, the deep red of the stains clashing with the bright pink of a rose stitched into the left shoulder.

This was the shirt that little Catherine Checas, aged three, was wearing when she started throwing up blood one morning in February. It was an alarming sight, particularly for her mother Gladys Checas, 21, and for the five other people held together in a single room.

Gladys Checas was instantly concerned. Her daughter had had a similar fit of vomiting blood at birth, back in their native Honduras. Now mother and daughter were 2,000 miles away, imprisoned, as they saw it, in a US government immigration detention center in rural Pennsylvania.

Checas was less than confident that her daughter would receive the urgent medical attention she needed. “There were so many children in there who were struggling, falling sick with fevers and yet the staff weren’t doing anything to help them,” she told the Guardian.

When she sought help, Checas insists that the only treatment she was offered for her young daughter was the advice that the girl should “drink lots of water”. Only when the child continued to bring up blood on the fourth day, Checas said, was she allowed to take Catherine to the local hospital for a flurry of tests that are still ongoing.

Catherine Checas spent a total of 11 months inside the Berks County residential center in Pennsylvania – a family detention facility used by the US immigration authorities to hold mothers and children picked up as they illegally crossed the border with Mexico last summer. She was one of 43 children detained at Berks, of whom 15 were under five.

The center is licensed by the state of Pennsylvania, with Berks County staff (they are not called guards) employed to interact with the residents. US Immigration and Customs Enforcement (ICE) says it is an appropriate setting to allow mothers and their young children to stay together while their asylum petitions are being processed.

“Family residential centers are an important part of the US government’s comprehensive response to the spike in illegal migration that occurred last summer. They are an effective and humane alternative for maintaining family unity,” an ICE spokeswoman, Sarah Maxwell, told the Guardian.

But a Guardian investigation based on interviews with former Berks residents and their lawyers reveals a slew of complaints about conditions inside the center and the way that child detainees are treated. At the heart of these complaints is the experience of being forced to remain on the grounds of the center, which lawyers representing many of the children say is tantamount to captivity and is traumatizing.

“There’s only one way to describe the kid: he’s sad,” said Matthew Archambeault, an immigration lawyer, in reference to a two-year-old boy currently in Berks whom he represents. “He is definitely depressed. He keeps telling his mom he wants to leave, and every time relatives visit from Connecticut he says, ‘Take me with you, take me with you, I want to go.’”

The boy, whom Archambeault did not name, has been at the detention center since last June. “This child has spent a significant part of his life so far in detention – he understands clearly that this is not a place someone his age should be.”

Berks County, along with two similar family detention facilities in Texas, are the subject of a current lawsuit in the US district court in Los Angeles in which human rights advocates have called for the centers to be shut down arguing that they violate federal child protection laws.

The judge in the case, Dolly Gee, has given the government 10 days to find a resolution to the complaints, indicating that if agreement cannot be reached she is minded to order the release of all 1,000 current residents of the facilities.

ICE insists that the Berks center is an “open environment” that includes playrooms, social workers, educational services and access to legal counsel. “Residents are never locked in the center, and they have free movement throughout the grounds during the daylight hours. No gates restrict the residents; however, they are required to stay on the center’s grounds. The center is focused on resident security,” Maxwell said.

With regard to the Catherine and her bloodstained T-shirt, Maxwell added that comprehensive medical care is provided “from the moment the families arrive and throughout their entire stay at the facility”. For up to 96 residents at a time, there are more than 20 medical staff on hand, 24 hours a day.

But the suggestion that Berks “residents” – they see themselves as prisoners – are free to come and go was greeted with astonishment by recently released inmates. “That’s just ridiculous – it’s silly,” said Waddah Sbayee, who spent five months in the center with his 15-year-old daughter Alaa before being granted asylum having fled the Syrian civil war. “If I opened the door and went outside they would come after me – the doors are always locked unless there’s a guard posted at them.”

Waddah Sbayee and his daughter Alaa wave to Berks ‘residents’. Photograph: Guardian
The current legal battle over the status of the three family detention centers is a product of the extraordinary events of last summer, when the border with Mexico saw a dramatic rise in the number of children from Central America attempting to flee violence in their home countries and cross illegally into the US. Some 50,000 unaccompanied minors were picked up by US border patrols, plus a similar number in the presence of their mothers.

The political response of the Obama administration to the furor that erupted over the so-called “surge” was to put on a tough face – speeding up deportations and introducing a “no release” policy that led to hundreds of families being detained in Berks and its Texan equivalents. Now that policy is itself in unraveling in the wake of the legal challenge from human rights lawyers who say that holding children in detention violates the rights of minors to federal protection.

At the most extreme end of the experiences reported in Berks over the past year is the ongoing criminal prosecution of one of its former staff members, who has been charged with seven counts of institutional sexual assault. The charge sheet records testimony from witnesses alleging that the employee had liaisons last August with one of the young immigrant mothers in the center, meeting up with her in the female residents’ restroom, bedrooms, laundry rooms and chapel, including three incidents of penetrative sex.

Pennsylvania police officers record that the alleged victim said that “she consented to having sexual relations, but at the same time felt that she had to or else he would get annoyed with her”. She said that she was worried that if she resisted there would be “negative repercussions for her” because the employee had told her “if anyone found out about their relationship she would get deported and he would go to jail”.

ICE said that at soon as the allegations against the employee were raised, the agency responded immediately, staging an internal investigation and putting the man on administrative leave from which he has not returned. “ICE is working with the Bern Township police department on the related criminal investigation,” Maxwell said.

One former inmate also complained that she and her two young children had been placed overnight in a contained room that she likened to a solitary confinement cell. Patricia Trochez-Rivera said that she had been joking around with some other people in the center about how hard it was being kept there and quipped that she was going to slit her wrists.

Berks staff overheard the comment and – she believes as a pretext – used it to put her and her children Lilly, three, and Louis, six, into a room called the “medical room” where they were kept alone for 24 hours. “They wanted to punish me,” she said.

Trochez-Rivera and her children spent 10 months in Berks before being released. The children still plead with her several weeks later not to be sent back there. “They don’t want to see the guards, they remember what happened and get scared,” she said.

ICE insisted that the “medical room” is only used, as the name suggests, for medical reasons such as minimizing the risk of exposure to possible medical problems. The room is never used for disciplinary reasons and its door is not locked, the agency said.

But Carol Anne Donohoe, the legal representative for Trochez-Rivera, told the Guardian that “they don’t call it solitary, but that is what it is in effect. They put my client in there with her young children for 24 hours – it was an act of retaliation”.

Bridget Cambria, another lawyer working with Berks families, said the most distressing part of the job was hearing about the severe mental suffering of many of the child detainees. “There’s a lot of severe depression,” she said. “Some kids express suicidal thoughts. Though there are counselors at the facility, there are never enough.”

Cambria said that the paradox was that these conditions were being imposed by the federal government. “I don’t know of a single state that would allow the detention over months of a one-year-old. Yet I’ve seen clients in Berks whose toddlers have learnt to walk in detention. There’s an overwhelming sadness among kids like that who have been kept there for a very long time. They just feel hopeless.”