Carlos entered the United States without his parents near Hidalgo, Tex., on May 13 in a group of about 70 other migrants. An official with Customs and Border Protection, who spoke on the condition of anonymity because the investigation into Carlos’s death was in preliminary stages, told reporters that the boy did not show signs of illness in an initial medical screening on the day he was detained.

He was held in a processing center in the agency’s Rio Grande Valley sector until Sunday, the official said. Early that morning, Carlos told agents at the facility he was not feeling well. A nurse practicitioner determined he had influenza and recommended he receive doses of Tamiflu. Border Patrol agents bought the medicine from a nearby pharmacy.

Later Sunday, Carlos was moved to a Border Patrol station in Weslaco, about 20 miles away, where he could be separated, the official said. He was found dead on Monday morning, an hour after a welfare check.

Officials said Carlos was given a diagnosis of Influenza A, but it was not clear if he was specifically tested for the illness, and officials did not respond to questions for clarification.

In January, agents at an immigration processing facility in McAllen, Tex., said they were unable to isolate migrants with transmittable illnesses, such as influenza or chickenpox. The facility is a giant open warehouse, and chain link fencing separates groups of people. Instead, the agents said, the sick individuals could be moved to other stations, like Weslaco.