U.S. immigration officials on Friday defended their actions in the detention of a 7-year-old Guatemalan girl who died two days after she and her father were taken into custody along the U.S. border. The girl, identified by the Guatemalan government as Jackeline Caal, had gone days without food and water, a Department of Homeland Security statement said.

Yet immigration officials said she did not appear to be ill when detained. A Border Patrol form completed shortly after she was detained said she showed no signs of sickness, officials with Homeland Security and the U.S. Customs and Border Protection agency said.

The officials said the father, who CBS News confirmed is named Nery Caal, signed the form that said the girl was in good health and not sick. But, hours later, after Jackeline was placed on a bus, she started vomiting.

Get Breaking News Delivered to Your Inbox

She was not breathing when she arrived at a Border Patrol station. Emergency medical technicians revived her and she was flown to a hospital in El Paso, Texas, where she was found to have swelling in her brain and liver failure, officials said.

She later died. An autopsy was scheduled to determine the girl's death, and the results could take weeks.

"The agents involved are deeply affected and empathize with the father over the loss of his daughter," said U.S. Customs and Border Protection Commissioner Kevin McAleenan. "We cannot stress enough the dangers posed by traveling long distances, in crowded transportation, or in the natural elements through remote desert areas without food, water and other supplies."

Jackeline's death comes as increasing numbers of children and families are making the dangerous trek north from Central America, and as immigration officials are being increasingly criticized for their treatment of migrants who arrive at the U.S.-Mexico border.

The Department of Homeland Security Office of Inspector General announced Friday it will investigate the girl's death. Customs and Border Protection's Office of Professional Responsibility is also investigating.

The pair were taken into custody at about 9:15 p.m. Dec. 6 in a group of 163 people in remote New Mexico, about 90 miles from the nearest Border Patrol station in Lordsburg. The rugged, mountainous area is mostly deserted, home to ghost towns and abandoned buildings from Old West homesteader days.

It's an unforgiving terrain where Geronimo made his last stand, and it remains largely isolated with no cell service and few paved roads. There's a small Border Patrol operating base near where the group was found with food, water and bathrooms, but no medical help.

The Washington Post first reported the girl's story late Thursday, saying that, according to Customs and Border Protection, an initial diagnosis listed the cause of death as septic shock, fever and dehydration. Democrats criticized how dehydration may have contributed to the girl's death.

"It's illegal and simply barbaric to deny water to a young girl in custody, particularly after they turned themselves in to authorities," California Sen. Dianne Feinstein said in a statement. On Twitter, former Secretary of State Hillary Clinton said, "There are no words to capture the horror of a seven-year-old girl dying of dehydration in U.S. custody."

There are no words to capture the horror of a seven-year-old girl dying of dehydration in U.S. custody. What’s happening at our borders is a humanitarian crisis. https://t.co/8KZeynGjIv — Hillary Clinton (@HillaryClinton) December 14, 2018

The group of migrants was found near the Antelope Wells port of entry, which was closed when they arrived. It's not clear if they had been trying to cross legally. The migrants were bused from the area to Lordsburg in two groups, including about 50 minors without parents in the first group, officials said.

The father said the girl was vomiting on the bus. When they arrived at the Border Patrol station in Lordsburg at about 6:30 a.m. Dec. 7, she was not breathing, officials said.

Emergency medical technicians discovered the girl's fever was 105.7 degrees Fahrenheit, and she was airlifted to a hospital. She died shortly after midnight on Dec. 8. Her father was driven to El Paso and was at the hospital when his daughter died, officials said.

White House spokesman Hogan Gidley called Jackeline's death "a horrific, tragic situation" and called for "commonsense laws to disincentivize people from coming up from the border," crossing illegally. Guatemalan consular officials said they have spoken with the father who was deeply upset.

"It is important to show that, unfortunately, the places where migrants now enter are more dangerous and the distances they travel are greater," consular officials said. Immigration officials said hundreds of people who have been overcome by the harsh desert and sweltering conditions are saved by Border Patrol every year.