A video shows the boy in severe distress. He was discovered by his cellmate, not immigration officials, as they originally claimed.

Credit...Esteban Biba/EPA, via Shutterstock

Carlos Gregorio Hernandez Vasquez collapsed onto the concrete floor of his Border Patrol holding cell early one morning in May. He lay still, next to a toilet in his sweatshirt and jeans for four hours before his cellmate woke up and found him dead.

Mr. Hernandez Vasquez, a 16-year-old from Guatemala, had arrived in the United States six days earlier. At a federal processing center in McAllen, Texas, a nurse practitioner determined he had a 103-degree fever and the flu, and recommended that he be re-evaluated and hospitalized if his condition worsened. Instead he was left in his cell.

The account of a young man’s life cut short — obtained first by ProPublica through public records — appears to contradict the government’s assurances about how Mr. Hernandez Vasquez was cared for. And it raises bigger questions about improvements federal authorities claim to have made to the health care provided to migrants in custody.

Following Mr. Hernandez Vasquez’s death, a news release stated that he was discovered by federal agents during a welfare check. But a video recording provided by the Police Department in Weslaco, Texas, which initially investigated the case, shows that his death was flagged by his cellmate. Customs and Border Protection officials have not explained why the recording — in which the teenager vomits blood on the floor, his body crumpling and squirming in apparent distress — has a four-hour gap or why the nurse practitioner’s advice was ignored.

In the last year, tens of millions of dollars have been poured into providing better care for sick migrants in federal custody, but problems persist. Mr. Hernandez Vasquez is the sixth migrant under 18 to have died in federal custody since President Trump took office. Though migrant children have crossed the southwestern border in large numbers during the past decade, none had died in federal custody until last year.

A spokesman for Customs and Border Protection who asked not to be named said in a statement that the investigation into Mr. Hernandez’s death was proceeding, but did not comment on the specifics of the case. In the last year the number of medical practitioners along the southwestern border has increased more than tenfold, to 250 from 20, the statement said, and it noted that most of the agency’s facilities that process large numbers of migrants have medical support available 24 hours a day.

An examination by The New York Times this year found that most of the Border Patrol’s facilities along the border did not have sufficient staffing or protocols to assess the health of migrants, and that years of warnings from both inside and outside the government had largely been ignored.

The agency has historically seen its primary mission as law enforcement, but a record number of migrant families, many with young children, have created a new set of demands for caretaking.

The agency has argued that it has been overwhelmed by the large numbers, and has had no choice but to hold detainees for much longer than the 72-hour stays the facilities are designed for because it does not have enough workers to process all the newcomers.

Mr. Hernandez Vasquez entered the United States during the busiest month on record, when more than 144,116 people attempted to cross the border without authorization.

Migrants are often sick or injured when they reach the American border — a problem that is exacerbated twice a year, by flu season in the colder months and by scorching heat in the summer. Many have walked for days or weeks by the time they arrive and are severely dehydrated and malnourished. Some traverse rocky terrain, scale walls and cross through coursing rivers full of debris.

Shelter workers who receive migrants after they are processed by federal authorities say the care the migrants appear to have received is so minimal that they often have to be sent immediately to a hospital.

Another migrant boy, Felipe Gómez Alonzo, 8, was also on his sixth day of detention in a Texas border facility and also had a 103-degree fever. He was taken to a hospital but discharged several hours later and returned to a holding cell at a Border Patrol highway checkpoint in December 2018. His condition worsened, and he died.

His death, along with that of Jakelin Caal Maquin, 7, a migrant girl who died three weeks earlier, touched off an angry backlash from the public and lawmakers, who held hearings demanding answers.

The Coast Guard and federal Public Health Service sent temporary medical help to border facilities in response. And an agencywide evaluation that followed led the Department of Homeland Security to introduce new policies requiring Border Patrol agents to conduct more thorough interviews of incoming migrants. The department also announced a $47 million contract for migrant medical care.

The pressure on Border Patrol agents in recent months has waned because of new, more restrictive policies that have effectively blocked many migrants from entering the United States to request asylum. Apprehensions have dropped by nearly 100,000 since Mr. Hernandez Vasquez entered the country, to 45,250 in October, the most recent month available.

Records provided by the Weslaco Police Department detail what investigators learned after local paramedics were called in response to Mr. Hernandez Vasquez’s death.

When the teenager arrived on May 13, his incoming medical screening from immigration authorities said he was healthy, calm and alert. No concerns were raised about his health.

He began waiting to be placed in a children’s shelter overseen by the Health and Human Services department. The facilities are designed to house young migrants for weeks or months until they can be released into the care of a family member or other sponsor, but the system was backed up in May, causing delays in placement.

Three days into his wait, according to the records, an agent helped Mr. Hernandez Vasquez contact a friend or family member by phone. A shelter placement was identified on May 19, the records show, but by then Mr. Hernandez Vasquez was beginning to show signs of illness.

An emergency medical treatment report shows he was given Tylenol after a fever diagnosis. The nurse practitioner requested that he be evaluated again in two hours, if not sooner, and that if his condition worsened, he be sent to an emergency room. The second evaluation never happened. He got his last hot meal just after midnight.

In the hours before he died, Mr. Hernandez Vasquez could have been seen through a window in his cell as he collapsed onto a concrete bench and later onto the floor, where Mylar blankets, crackers and brightly colored juice bottles lay scattered. Four welfare checks were documented during that time, but the abridged video recording does not show anyone going into or out of his cell, and Mr. Hernandez Vasquez does not appear to move during the unexplained four-hour gap in the recording.

After he was discovered by his cellmate, a physician assistant performed a single chest compression, according to the report, but stopped when blood started to pour out of his ear and his arms stiffened, showing signs of rigor mortis. He had no pulse.

Investigators found a pool of blood around his head, though he did not appear to have cut himself. The trash can next to him contained a half-eaten sandwich and two unopened frozen burritos.

The Department of Homeland Security’s inspector general is looking into the young man’s death.

Joel Rivera, Weslaco’s police chief, said the department closed its inquiry after it established there had been no foul play. He said the four-hour gap in the video was not explained by Customs and Border Protection officials.

“What we’ve released is what we’ve got,” he said.

Mitchell Ferman contributed reporting.