A Guatemalan asylum seeker has told a US House panel of her daughter’s death, saying the toddler had contracted a deadly lung infection during a 20-day detention near the US border with Mexico.

Yazmin Juarez told a House of Representatives subcommittee that just weeks after they were released her daughter Mariee died at 19 months old.

Ms Juarez said it was hard to relive the experience, but she wanted to shed light on the lack of medical care.

“The world should know,” she said. “It can’t be so hard for a country like the United States to protect kids who are locked up.”

Ms Juarez testified at the House Committee on Oversight and Reform that was examining the treatment of refugees in US detention.

Images of filthy detention facilities jammed with refugees have sparked widespread criticism.

On Monday UN human rights chief Michelle Bachelet said she was “appalled” that migrant children were forced to sleep on floors.

President Donald Trump’s tough stance on immigration has been one of his signature policies.

“If Illegal Immigrants are unhappy with the conditions in the quickly built or refitted detentions centres, just tell them not to come,” Trump wrote on Twitter last week.

Ms Juarez told members of Congress, several of whom appeared shaken by her testimony, that her daughter was healthy when the pair were initially detained.

They were held with 30 others, including sick children whom Juarez said could have infected her daughter.

Several members of the subcommittee including New York Democrat Alexandria Ocasio-Cortez hugged Ms Juarez after she spoke.

The hearing came as a senior US Customs and Border Protection official told reporters that border agents were detaining only about 200 unaccompanied children at locations in the Southwest as of Wednesday, down from more than 2,500 in May. 

The reduction reflects funding increases that have enabled a federal health agency to expand its holding capacity.