A 7-year-old girl from Guatemala died of dehydration and shock while in U.S. Border Patrol custody last week, the Department of Homeland Security confirmed early Friday.

The girl, identified as Jackelin Caal Maquin, started having seizures roughly eight hours after the Border Patrol took her into custody along with her father and a group of 163 other people who had crossed the border illegally along a stretch of New Mexico desert, the department said. Her death was first reported by the Washington Post on Thursday evening.

The migrants turned themselves in to Border Patrol agents at a port of entry in New Mexico after it had closed at about 10 p.m. on Dec. 6, DHS officials told reporters Friday.

The child initially appeared well, and her father signed a form declaring that she suffered no significant health problems, a Customs and Border Protection official said.

It’s unclear whether he understood the form, however. While CBP spoke with him in Spanish, a Guatemalan consular official told BuzzFeed the father was most fluent in one of the Mayan languages.

The girl and her father waited for several hours on the border for a transport bus to Lordsburg, New Mexico. The group they traveled with included about 50 unaccompanied minors, who received priority transportation to the nearest major Border Patrol station. They had access to water and restrooms during the time they were detained there, officials said.

Once the father and daughter boarded the bus for the roughly three-hour trip to Lordsburg, the father told agents that his daughter had begun to vomit. The agent notified the station where the bus was headed to put medical personnel in place.

The girl then began to suffer seizures. By the time they arrived at the station at about 6:30 a.m., the father said his girl was no longer breathing.

ASSOCIATED PRESS This Jan. 20, 2012, file photo, near Cloverdale in New Mexico's Bootheel region, shows a gated part of the Diamond A Ranch and is 77 miles south of Lordsburg, New Mexico, the nearest U.S. Border Patrol station.

She “reportedly had not eaten or consumed water for several days,” Customs and Border Protection, the DHS agency that includes Border Patrol, told the Washington Post. Emergency responders measured her temperature at 105.7 degrees and took her by helicopter to the nearest trauma center, Providence Children’s Hospital in El Paso, agency officials said. There, she went into cardiac arrest and was revived for a time, according to CBP.

A CT scan revealed brain swelling and that the child experienced liver failure. Within 24 hours of arrival, she had died.

A CBP official described the child’s death as a “tragedy,” but said she received the best possible medical care under the circumstances.

“These are difficult, remote regions,” the CBP official said. “There’s not infrastructure. These are not cities we’re talking about. These are mountains and deserts.”

It may take several weeks to get the results of an autopsy, DHS said.

It is “extremely dangerous” to travel to the U.S. without authorization, and officials “are begging parents to not put themselves or their children at risk attempting to enter illegally,” an unnamed DHS spokesperson said in the statement.

The official also expressed DHS’s “sincerest condolences” to the child’s family.

“Border Patrol agents took every possible step to save the child’s life under the most trying of circumstances,” the unnamed spokesperson said. “As fathers and mothers, brothers and sisters, we empathize with the loss of any child.”

White House deputy press secretary Hogan Gidley said the administration did not take responsibility for what he called “a horrific, tragic situation.”

“Does the administration take responsibility for a parent taking a child on a trek through Mexico to get to this country?” a reporter asked on Friday, to which Gidley responded, “No.”

Border Patrol agents in November detained a record 25,172 “family unit members” and 5,283 minors traveling without their parents, according to Department of Homeland Security figures released last week.

The Trump administration is no longer enforcing the family separations carried out in May and June, which sparked a nationwide outcry and prompted a federal judge to order the government to reunite children with their guardians.

But the child’s dehydration death last week could inflame anger over the agency’s treatment of children, especially with new reports this week about the conditions of CBP facilities.

When the Trump administration pushes for the militarization of the border, including more border wall construction, they are driving people fleeing violence into the deadliest desert regions. Cynthia Pompa, advocacy manager for the ACLU Border Rights Center

The government is currently holding nearly 15,000 unaccompanied migrant children in federally contracted detention facilities, the Department of Health and Human Services said Thursday. Shelters holding children are about 92 percent full, agency spokeswoman Evelyn Stauffer told CNN.

Cynthia Pompa, advocacy manager for the ACLU Border Rights Center, said in a statement Thursday that the “tragedy represents the worst possible outcome when people, including children, are held in inhumane conditions.”

“When the Trump administration pushes for the militarization of the border, including more border wall construction, they are driving people fleeing violence into the deadliest desert regions,” Pompa said. “The fact that it took a week for this to come to light shows the need for transparency for CBP.”

The Homeland Security Inspector General is investigating the death to verify whether proper protocols were followed, officials said. Such investigations routinely take place after migrants die in Border Patrol custody.

This article has been updated with further information on Caal’s death and comment from the White House, Department of Homeland Security and others.