Homeland Security Secretary Kirstjen Nielsen said Friday that the death of a seven-year-old migrant girl in Border Patrol custody was "a very sad example of the dangers of this journey."

The Department of Homeland Security also released a statement calling on migrant parents to not "put themselves or their children at risk attempting to enter illegally."

The Trump administration's response to the girl's death drew backlash on Friday from critics who said Nielsen and her department were wrongly blaming the girl's death on her family, rather than the conditions in Border Patrol facilities.

A Trump official conceded earlier this week that the Border Patrol facilities were not built to house families and children.

The Department of Homeland Security and its secretary, Kirstjen Nielsen, are drawing backlash after appearing to blame the death of a seven-year-old migrant girl in Border Patrol custody on the family members who brought her across the US-Mexico border.

In an interview with "Fox & Friends" early Friday morning, Nielsen told the hosts that the girl's death "is just a very sad example of the dangers of this journey" migrants take.

The child arrived in the US on December 6 with her father, as part of a group of 163 migrants who crossed the border illegally in a remote part of the desert in New Mexico, the Washington Post reported Thursday evening.

Read more: A 7-year-old Guatemalan girl died 8 hours after entering Border Patrol custody

A woman rests on a concrete bench in a holding cell at the U.S. Border Patrol processing facility June 27, 2007 in Deming, New Mexico. Getty Images/Chip Somodevilla

Nielsen said agents gave "immediate care" to the girl and the department will review what happened during her time in custody.

"This family chose to cross illegally," she said. "What happened here was that they were about 90 miles away from where we could process them. They came in such a large crowd that it took our Border Patrol folks a couple of times to get them all."

According to The Post, the girl was in custody for roughly eight hours before she began having seizures. When emergency responders arrived, they found her body temperature to be 105.7 degrees and she "had not eaten or consumed water for several days."

'A culture of cruelty'

In this photo provided by U.S. Customs and Border Protection, people who've been taken into custody related to cases of illegal entry into the United States, sit in one of the cages at a facility in McAllen, Texas, Sunday, June 17, 2018. Customs and Border Protection's Rio Grande Valley Sector via Associated Press

A statement from the Department of Homeland Security on Thursday evening began by noting, "As we have always said, traveling north illegally is extremely dangerous."

It went on to say parents should not "put themselves or their children at risk attempting to enter illegally," and urged them to "please present yourselves at a port of entry and seek to enter legally and safely."

But migrants and advocacy groups have long argued that the US's increasingly fenced-off, militarized border — as well as the Trump administration's practice of turning away asylum-seekers at the ports of entry — forces migrants to cross in increasingly remote, dangerous locations in the desert.

Critics immediately seized on both Nielsen's and DHS' statements, accusing them of unfairly blaming the girl's family for her death.

The American Civil Liberties Union blamed the "lack of accountability, and a culture of cruelty within CBP" for the child's death in a statement to The Post.

CBP Commissioner Kevin McAleenan recently conceded to lawmakers that the facilities families are held in for processing were not built to house children.

"Our Border Patrol stations were built decades ago to handle mostly male single adults in custody, not families and children," he said during his testimony before the Senate Judiciary Committee on Tuesday.