A 7-year-old girl picked up with her father and dozens of other migrants along a remote stretch of the US-Mexico border suffered seizures and spiked a high fever in immigration custody and later died, federal officials said.

An autopsy was scheduled to try to determine what killed the girl, who appeared to be dehydrated and suffering from shock and apparently had not had anything to eat or drink in days, they said.

The girl was found December 6 near Lordsburg, New Mexico, by US Border Patrol agents. She was in custody for about eight hours before she began having seizures, US Customs and Border Patrol officials said. Emergency medical technicians discovered the girl's fever was 40.9 degrees Celsius, and she was airlifted to an El Paso, Texas, hospital, where she later died.

The results of the autopsy could take weeks, officials said.

The Guatemalan girl'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 criticised for their treatment of migrants who arrive at the US-Mexico border. A review of what happened in the girl's case will take place, federal officials said.

"On behalf of the Department of Homeland Security, our sincerest condolences go out to the family of the child," said a statement from Homeland Security, the parent department of the Border Patrol. "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 empathise with the loss of any child."

The girl's death raises questions about whether border agents knew she was ill and whether she was fed anything or given anything to drink during her time in custody. Immigration officials said hundreds of people who have been overcome by the harsh desert and sweltering conditions are saved by Border Patrol every year.

When a Border Patrol agent arrests someone, that person gets processed at a facility but usually spends no more than 72 hours in custody before either being transferred to Immigration and Customs Enforcement or, if the person is Mexican, quickly being deported home.

Immigration officials said that the girl died at the hospital less than 24 hours after being transported. It's unknown what happened to her during the eight hours before she started having seizures and was flown to the hospital.

The girl was traveling with a group of 163 people, who approached agents to turn themselves in on December 6, immigration officials said. It's unclear what became of her father.

Immigrants, attorneys and activists have long raised issues with the conditions of Border Patrol holding cells. In Tucson, Arizona, an ongoing lawsuit claims holding cells are filthy, extremely cold and lacking basic necessities such as blankets. A judge overseeing that lawsuit has ordered the agency's Tucson Sector, which patrols much of the Arizona-Mexico border, to provide blankets and mats to sleep on and to continually turn over surveillance footage from inside the cells.

Agents in Arizona see groups of more than 100 people, sometimes including infants and toddlers, on a regular basis.

Arresting such groups poses logistical problems for agents, who have to wait on transport vans that are equipped with baby seats to take the migrants to processing facilities, some which are at least a half-hour north of the border.

The death of the 7-year-old comes after a toddler died in May just after being released from an ICE family detention facility in Texas and as President Donald Trump's administration attempts to ban people from asking for asylum if they crossed the border illegally. A federal appeals court has temporarily blocked that ban, but the administration asked the US Supreme Court to reinstate it on Tuesday.