A video of the final hours of a Guatemalan teenager inside a Customs and Border Protection cell shows him collapsing to the floor and later dying next to a toilet where he was discovered by another teen the next morning.

Carlos Gregorio Hernandez Vasquez, who was called “Goyito” by family members, died May 20, eight days after he surrendered to border authorities after crossing the border in South Texas.

Carlos Gregorio Hernandez Vasquez Courtesy of family

The potentially disturbing black-and-white security camera video and other documents obtained by ProPublica from Weslaco, Texas, police under Texas open government laws shows 16-year-old Carlos weak and unable to stand, then collapsing at one point on the concrete floor.

Later, Carlos is seen getting up and staggering to the toilet behind a partial wall and collapsing on the floor there. He appears to struggle to get up or move but hours later, at about 6:05 a.m., Carlos’ cellmate, who also appears to be a teenage boy, finds him. After failing to wake him up, the teen calls for agents.

The video directly contradicts Customs and Border Protections statements that Carlos was found unresponsive during a welfare check.

In a statement attributed to a CBP spokesperson, the agency said the investigation of Carlos' death is ongoing. "While we cannot discuss specific information or details of this investigation, we can tell you the Department of Homeland Security and this agency are looking at all aspects of this case to ensure all procedures were followed."

The agency statement did not respond to NBC News' questions on whether agents on duty at the time are still overseeing migrants in custody or whether officials responsible for ensuring Carlos received medical care are on duty while the investigation is ongoing.

As the video became international news and was shared on social media, family members' grief was magnified, the family said through a statement released by the Texas Civil Rights Project. According to the group, the first time the family saw the video was through social media posts and news stories.

"It’s been really painful for our family to lose Carlos. We thought that not knowing what happened to him in that cell, whether he was all alone when he died, whether it was preventable, that we don’t know if we can hold the people responsible accountable — that that was the worst grief we could have, but having all these people watching him die on the internet is something we couldn’t have imagined in a movie or a nightmare," the family said in its statement.

Stephen Engelberg, Pro Publica editor in chief, said in a statement to NBC that the before publication the news outlet discussed the video with Carlos' father and a close family member. He said they described the details and why it was important to publish the video. Exisions were made based on concerns expressed by the family member, Engelberg said.

"We apologize to the family for the pain the release of the video has caused them," Engelberg stated. "We continue, however, to believe that the American people need to see this video in order to understand the actions of their government and what really happened to Carlos," he stated.

The agency says it has significantly increased the number of medical personnel "engaged" along the southwest border to 250, up from 20 six months ago. That means most facilities now have 24/7 medical support, the agency said.

After a nurse practitioner diagnosed Carlos with the flu, she had recommended he be checked on two hours later and be taken to the hospital if his condition worsened. Instead, agents moved him from an overcrowded processing center in McAllen, Texas, to its Weslaco Border Patrol station.

Documents state that Border Patrol agents checked on Carlos three times over four hours during the night. The video does not show any agents coming into the cell, but it abruptly stops after Carlos’ initial collapse and there is a gap of several hours in the video that was posted online by ProPublica.

NBC has not separately obtained a copy of the video or seen the actual documents.

"As immigration authorities sat by, a child lay dying from the flu on a slab of concrete in a pool of his own vomit next to a toilet. Carlos Gregorio Hernandez Vasquez's death was preventable. As flu season is upon us, the Trump administration has ignored the CDC's demands to vaccinate children in their immigration jails," stated in a news release from Jess Morales Rocketto, chair of Families Belong Together, a coalition of groups opposing the Trump administration's immigration policies.

"Three children have died of flu-related illnesses on the Trump administration's watch in the past year," the statement says. "We need action immediately to get children the life-saving care they deserve and ensure that no more kids die in cages."

CBP officials had said in May that Carlos was found unresponsive in a short-term holding room about an hour after his previous welfare check. Officials told NBC News that Carlos had been prescribed Tamiflu for treatment, which agents picked up from a local pharmacy.

When asked in May why they did not take Carlos to a hospital for treatment, a CBP official told reporters in a teleconference that such a decision was up to medical providers at the facilities, NBC News reported then.

Federal law requires unaccompanied migrant children to be transferred to the custody of the Department of Health and Human Services within 72 hours. However, the Trump administration has not been adhering to that rule amid increases in arrivals of migrants, including many unaccompanied children, during the last couple of years.

Rep. Bennie Thompson, D-Miss., chairman of the House Committee on Homeland Security, issued a statement saying that not only did CBP hold Carlos beyond the legal limit and fail to care for him, "the agency seems to have been untruthful with Congress and the public about the circumstances surrounding his tragic death."

"This is inexcusable," Thompson said. He called on the Department of Homeland Security's inspector general to examine all video from Carlos' time in custody, do a speedy investigation and release their findings as soon as possible.

"The death of one child in CBP custody is too many, and Carlos was the sixth in under a year. It is past time the Trump administration is held accountable," Thompson said.

Carlos' body was flown back to Guatemala where thousands attended his funeral. His parents had told Telemundo in an interview that their son loved soccer and music and could play the bass and piano. He had gone to the U.S. to help support his eight siblings, in particular, his brother with special needs.

A string of deaths of children in CBP custody in 2018 and 2019, including three from flu-related illnesses, have drawn outrage from members of Congress who have pushed legislation to increase medical training, equipment and personnel at border stations. In July, the House passed a bill sponsored by Rep. Raul Ruiz, D-Calif., a former emergency room doctor, that establishes standards of care for people in CBP custody. The Senate has yet to take up the bill.

“It is outrageous and unconscionable that Carlos was dying or dead on the floor for 4½ hours without attention," Ruiz told NBC News in a statement. The new facts on Carlos' death show the importance of congressional oversight to verify the truth and the need for the Senate to pass his bill, he said.

The Trump administration has sought to extend the limits on how long children can be kept in custody.

Sunday marks one year since Jakeline Caal Maquin, 7, died in CBP custody. She had shown signs of illness but was placed on a 90-mile bus ride from Antelope Wells, New Mexico, to El Paso, Texas, and was not breathing when she arrived.

CBP is required to report the death of any person in its custody within 24 hours, and provide relevant details about the death under a rule attached to law that provided DHS funding in 2018. Rep. Joaquín Castro, D-Texas and Rep. Pramila Jayapal, D-Wash., introduced a bill Friday to expand that requirement to the Department of Homeland Security and the Department of Health and Human Services. They named the bill the Jakelin Caal Death in Custody Reporting Act of 2019.

"One year later, Congress has yet to receive any of the information we’ve requested surrounding her death, despite laws that mandate agencies to report on all deaths of migrant children in their custody," Castro said in a statement.

The federal government has held a record of nearly 70,000 children in custody over the past year, according to government data. In a report, The Associated Press noted the numbers are enough to overflow an NFL stadium.

A group of doctors offered to provide CBP with 100 vials of free flu vaccines and to administer flu shots for free, but CBP did not accept the offer. The Centers for Disease Control has recommended that detained migrants be vaccinated, but CBP also rejected that recommendation, according to a letter the agency wrote to Rep. Rosa DeLauro, D-Conn., and reported by The Washington Post.

Follow NBC Latino on Facebook, Twitter and Instagram.