Border authorities are referring 50 people a day for urgent medical care, including tuberculosis, flu and even pregnant women about to give birth, a top official said Monday, saying it’s unlike anything they’ve ever seen before.

Most of those in need of care are children, and a staggering 28 percent are under age 5, having been dragged along for the trip by parents who in many cases are hoping to use the children as a shield against speedy deportation from the U.S.

The numbers were released after a full review was done of all children in the custody of Customs and Border Protection in the wake of two illegal-immigrant children who died in U.S. hospitals in December.

CBP Commissioner Kevin McAleenan said most of those needing help were ill when they arrived at the border, and some appear to have made the initial decision to leave even while ailing.

“Many were ill before they departed their homes,” the commissioner said. “We’re talking about cases of pneumonia, tuberculosis, parasites. These are not things that developed urgently in a matter of days.”

Agents have spotted a new trend in the traffic from Central America to the U.S., with smuggling organizations using commercial buses to get people through the journey in less than a week. That’s far faster than the 25 to 30 days it takes most migrants who walk or take a mixture of transportation to get from Guatemala, El Salvador and Honduras through Mexico and to the border.

Mr. McAleenan said the commercial buses are also delivering migrants to parts of the border such as western Texas and New Mexico that have traditionally been less afflicted by the flow of immigrants crossing into the U.S. illegally.

The faster trip also makes it easier for sick people to come, and provides “confidence for parents to bring younger children” along as well, he said.

As of Monday, 17 of the people referred for medical care were still hospitalized, Mr. McAleenan said.

The deaths of a 7-year-old girl and an 8-year-old boy in CBP custody in December have drawn fierce criticism, with some Democrats and a number of immigrant-rights groups saying the agency has blood on its hands.

The girl arrived with her father as part of a group of more than 160 people at a remote part of the border in New Mexico, hours from the nearest Border Patrol station. Her father at first told agents she was healthy, but later alerted them when she began to vomit and then lose consciousness.

Agents revived her twice and she was flown by air ambulance to a hospital where she later died after suffering major organ failure.

The boy died Christmas Eve after six days in CBP custody, having been transferred to multiple facilities because of overcrowding due to the new surge of people.

His initial illness was diagnosed at a hospital as a common cold, then he was deemed to have a fever. He was treated and released, but hours later, back at a border holding facility, he vomited.

His father declined medical attention, but an agent during a later welfare check said the boy looked ill and had him taken back to the hospital, where he died.

The boy’s mother, back in Guatemala, told Reuters news agency they had been told by neighbors that if he brought the child, the father would get more lenient treatment by U.S. authorities and would be quickly released into the U.S. where he could disappear into the shadows, live in the U.S. illegally and find work.

She was referring to a 2015 court ruling in the Flores case, which saw an Obama-appointed judge issue a decision that forces the government either to separate children from their parents — a practice that was tried earlier this year, to much criticism — or to release both parents and children within about 20 days.

That ruling was appealed by the Obama administration, but was mostly upheld by an appeals court.

Homeland Security officials say families released rarely show up for deportations. About one-third of them cut off ankle bracelets almost immediately after they’re released, authorities say.

“It’s no secret that we are seeing an increase of family units and unaccompanied aliens minors as a direct result of the Ninth Circuit’s Flores Settlement Agreement and the 2008 [Trafficking Victims Protection Reauthorization Act] — these are clear gaps in U.S. law that smugglers and traffickers are taking advantage of,” said Katie Waldman, a Homeland Security spokeswoman.

Investigations into both December deaths are ongoing and final medical evaluations have not been publicly detailed.

But border illnesses are nothing new.

During the 2014 surge of Unaccompanied Alien Children (UAC) authorities reported massive chickenpox and other communicable disease outbreaks.

The numbers of children crossing now exceed that previous surge, with 22,000 children nabbed at the border in December, out of about 60,000 total immigrants who were either caught sneaking in, or were encountered at border crossings.

Since Dec. 22 there have been 450 medical cases that needed treatment, including flu, parasites, blood infections, abscesses, tuberculosis and pneumonia, Mr. McAleenan said.

Part of the surge could be that the government is looking more closely at those in its custody. Where before agents deferred to parents on whether their children needed care, the two recent deaths suggest parents can’t be trusted to know dangers or admit to them.

Every child in CBP custody was given a new medical check last week, including taking vital signs. Medical pros from the Coast Guard and the Public Health Service are going to be on site moving forward, the government says.

The Centers for Disease Control and Prevention has also been roped into duty to look at the infectious diseases, with U.S. officials saying they think the shelters where migrants stage in Mexico before crossing the border could be an incubator.