By Nick Valencia and Chris Boyette, CNN

A 7-year-old Guatemalan girl died last week, hours after she was taken into Border Patrol custody, the Department of Homeland Security said.

The Washington Post first reported Thursday that the girl died of dehydration and septic shock last week in El Paso, Texas after she was taken into custody by Border Patrol after crossing illegally with her father into the United States.

“Our sincerest condolences go out to the family of the child,” the Department of Homeland Security, which oversees Border Patrol, said in a statement.

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

The girl and her father were part of a large group of migrants who approached Border Patrol agents in a remote area of the New Mexico desert last Thursday, the newspaper reported, citing US Customs and Border Protection records.

The child began having seizures hours after she was taken into custody and was airlifted to the Providence Children’s Hospital in El Paso, CBP told the Post.

Cardiac arrest

She went into cardiac arrest and was revived by medics but the girl couldn’t recover and died less than 24 hours later, DHS told CNN in a statement.

“Due to patient confidentiality, the hospital is unable to provide any patient information and is referring any inquiries regarding this patient to CBP,” said Monique Poessiger, a hospital spokeswoman.

A DHS spokesperson said an autopsy will be performed but the results could take several weeks.

The CBP’s Office of Professional Responsibility has launched an investigation to “ensure all appropriate policies were followed.”

“Unfortunately, despite our best efforts and the best efforts of the medical team treating the child, we were unable to stop this tragedy from occurring. Once again, we are begging parents to not put themselves or their children at risk attempting to enter illegally. Please present yourselves at a port of entry and seek to enter legally and safely,” the spokesperson told CNN.

The names of the girl and her father were not released. CNN has reached out to local CBP authorities.

Congressman Joaquin Castro, D-Texas, said late Thursday in a statement he was “devastated by reports that a seven-year-old girl who was taken into Customs and Border Patrol custody died of dehydration and exhaustion. I’ll be asking for a full investigation by the Inspector General and Congress into the conditions and circumstances that led to her death.”

“We can do better as a nation,” said Castro, a member of the House Foreign Affairs and House Intelligence Committees.

“This is a humanitarian crisis and we have a moral obligation to ensure these vulnerable families can safely seek asylum, which is legal under immigration and international law at our borders,” Castro’s statement said.

‘Worst possible outcome’

Cynthia Pompa, advocacy manager for the ACLU Border Rights Center, in a statement called for “a rigorous investigation into how this tragedy happened and serious reforms to prevent future deaths.”

“This tragedy represents the worst possible outcome when people, including children, are held in inhumane conditions,” the statement said. “Lack of accountability, and a culture of cruelty within CBP have exacerbated policies that lead to migrant deaths. In 2017, migrant deaths increased even as the number of border crossings dramatically decreased.”

Democratic Rep. Beto O’Rourke of Texas on Thursday called for transparency in the investigation of the child’s death.

“I am deeply saddened by this girl’s death. There must be a complete investigation and the results shared with Congress and the public,” he tweeted.

The girl’s death comes months after a toddler died six weeks after being released from an Immigrations and Customs Enforcement facility in Dilley, Texas. The toddler’s mother and her attorneys alleged she contracted a respiratory infection after they arrived to the detention center and ICE provided substandard medical care for the toddler.

The toddler and her mother came from Guatemala and were detained after crossing into the US via the Rio Grande.