After being detained in El Paso, Texas, he and his father were taken to a local processing centre, where they spent two days. They were then sent to El Paso Border Patrol Station, where they were held for another two days.
On 22 December, they were transferred to Alamogordo Border Patrol Station, in neighbouring New Mexico.
On Monday morning, an agent noticed that the boy "was coughing and appeared to have glossy eyes". He was taken with his father to a hospital where he was diagnosed with a common cold and given Tylenol (paracetamol).
While being evaluated for release, he was found to have a fever of 103F (39.4C) and held for more observation. He was released shortly afterwards with a prescription for an antibiotic and ibuprofen.
The boy and his father were taken to a temporary site at the Highway 70 checkpoint, where the child received the medication. Two hours later, he vomited.
His father declined further medical assistance, the CBP said, as the child had been feeling better.
The child appeared lethargic at around 22:00, when he was sent back to the hospital. While being transported, the boy vomited and lost consciousness, and doctors at the hospital were unable to revive him.
The CBP earlier said the boy died just after midnight. It did not explain why they were held for so long.