Department of Homeland Security Secretary Kirstjen Nielsen on Friday blamed the family of a 7-year-old migrant girl for her death in U.S. custody, saying the group never should have tried to come to the U.S. without authorization.

Nielsen said Jakelin Caal Maquin’s death was “heart-wrenching” and said her heart goes out to the child’s family. But she also used the opportunity to argue against migrants and asylum-seekers making the journey to the U.S.

“You know, this is just a very sad example of the dangers of this journey,” Nielsen said on “Fox & Friends.” “This family chose to cross illegally.”

The girl, whose identity was revealed Friday morning, came from Guatemala with her father in a group of 163 migrants, according to DHS. She died from shock and dehydration roughly 24 hours after being brought to a hospital, the Washington Post first reported.

DHS faced a flurry of condemnation after news broke of Jakelin’s death late Thursday. In multiple statements, the agency argued it had done everything it could to prevent Jakelin’s death in the relatively brief time she was in the custody of U.S. Customs and Border Protection.

On Dec. 6, Jakelin, her father and the rest of their group went to a closed port of entry to cross illegally into the U.S. They then turned themselves in to Border Patrol agents and were taken into custody in New Mexico.

A Customs and Border Protection official told reporters that the child initially appeared well and her father signed a form stating she had no significant health problems. A Guatemalan official told Buzzfeed News that the form was in English and the father, who speaks a Mayan language, may not have understood Border Patrol agents’ explanations.

They waited several hours to be transported to Lordsburg, New Mexico, and had access to water and restrooms in the meantime, officials said.

During the three-hour bus ride, Jakelin began to vomit and suffer seizures. She had a fever of nearly 106 degrees, according to DHS. Her father said the child had not been able to consume water or food for days, the agency said in a statement.

Jakelin was then taken to a hospital by helicopter. She died there on Dec. 8.

Nielsen told “Fox & Friends” that there were complications with providing care to the child because she was part of a large group far from the processing location, again turning the blame around on the migrants.

“We gave immediate care,” Nielsen said. “We will continue to look into the situation, but again, I cannot stress how dangerous this journey is when migrants choose to come here illegally.”

Although details about Jakelin’s family’s specific circumstances are not yet known, immigrant rights advocates have argued for years that border enforcement strategies drive migrants to take more dangerous routes to reach the U.S.

The number of migrant deaths rose by about 20 percent from 1998 to 2016, while the number of those captured crossing illegally plummeted 70 percent during the same period, ProPublica reported last year. A significant source of the problem is the effort by authorities to deter migrants from using “easy-to-cross, hard-to-police urban corridors,” and instead push them “into barren, isolated terrain,” the outlet wrote.

This year, asylum-seekers trying to ask for help at ports of entry have faced increasingly long wait times, sometimes being told they must wait in Mexico for weeks or months.

Those policies contribute to people trying to get to the U.S. through other means, Amnesty International Tactical Campaigns Manager Ashley Houghton said in a statement.

“What wouldn’t you do to save your family’s life? This child’s father made a dangerous journey spanning almost 2,000 miles in hopes of ensuring safety and security for himself and his daughter,” she said. “When ports of entry are all but closed, forcing asylum seekers to wait for weeks just to seek protection, families will be forced into taking more dangerous routes to reach the United States.”