A seven-year-old girl who crossed the US-Mexico border with her father last week died after being taken into the custody of the US Border Patrol, federal immigration authorities have confirmed.

The Washington Post reported the girl died of dehydration and shock more than eight hours after she was arrested by agents near Lordsburg, New Mexico. The girl was from Guatemala and was travelling with a group of 163 people who approached agents to turn themselves in on December 6.

It is unknown what happened to the girl during the eight hours before she started having seizures and was flown to an El Paso hospital.

In a statement, Customs and Border Protection said the girl had not eaten or consumed water in several days.

Processing 163 immigrants in one night could have posed challenges for the agency, whose detention facilities are meant to be temporary and do not usually fit that many people.

When a Border Patrol agent arrests someone, that person gets processed at a facility but usually spends no more than 72 hours in custody before they are either transferred to Immigration and Customs Enforcement or, if they are Mexican, quickly deported home.

The girl’s death raises questions about whether border agents knew she was ill and whether she was fed anything or given anything to drink during the eight-plus hours she was in custody.

Immigrants, lawyers and activists have long raised issues with the conditions of Border Patrol holding cells.

In Tucson, an ongoing lawsuit claims holding cells are filthy, extremely cold and lacking basic necessities such as blankets. A judge overseeing the case has ordered the agency’s Tucson sector, which patrols much of the Arizona-Mexico border, to provide blankets and mats to sleep on, and to continually turn over surveillance footage from inside the cells.

The Border Patrol has seen an increasing trend of large groups of immigrants, many with young children, walking up to agents and turning themselves in.

Most are Central American and say they are fleeing violence. They turn themselves in instead of trying to circumvent authorities, many with plans to apply for asylum.

Agents in Arizona see groups of more than 100 people on a regular basis, sometimes including infants and toddlers.

Arresting such groups poses logistical problems for agents, who have to wait on transport vans that are equipped with baby seats to take them to processing facilities, some which are at least half hour north of the border.

The death of the seven-year-old comes after a toddler died in May just after being released from an ICE family detention facility in Texas, and as the administration of Donald Trump attempts to ban people from asking for asylum if they crossed the border illegally. A federal appeals court has temporarily blocked that ban, but the administration asked the US Supreme Court to reinstate it Tuesday.