The inspector general for the US Department of Homeland Security has warned about "dangerous overcrowding" in migrant detention facilities in Texas.

The report by the agency watchdog came a day after a group of Democratic politicians toured detention centres for undocumented immigrants in the state bordering Mexico and denounced "horrifying" conditions there.

"We encourage the Department of Homeland Security (DHS) to take immediate steps to alleviate dangerous overcrowding and prolonged detention of children and adults in the Rio Grande Valley," acting DHS Inspector General Jennifer Costello said in a memorandum to acting Homeland Security Secretary Kevin McAleenan.

The report included images taken at several Texas sites, showing dozens of migrants including young children packed shoulder to shoulder into cage-like holding areas or cells.

The acting DHS inspector general said one senior manager at a detention facility described the situation as a "ticking time bomb" and raised security concerns for agency staff and detainees.

Ms Costello said her office had toured five Border Patrol holding facilities in Texas's Rio Grande Valley in early June and observed "serious overcrowding and prolonged detention of unaccompanied alien children, families, and single adults".

"Specifically, Border Patrol was holding about 8,000 detainees in custody at the time of our visit, with 3,400 held longer than the 72 hours generally permitted," she said.

"Of those 3,400 detainees, Border Patrol held 1,500 for more than ten days.

"Border Patrol's custody data indicates that 826 (31%) of the 2,669 children at these facilities had been held longer than the 72 hours generally permitted."

Children at three of the five Border Patrol facilities had no access to showers and few spare clothes, while two facilities had not provided hot meals, only sandwiches.

Most single adults had not had a shower in a month and were being given wet-wipes. Some detainees were suffering from constipation after a diet consisting only of bologna sandwiches.

According to Border Patrol figures, 223,263 people were detained in the Rio Grande Valley sector between October 2018 and May 2019, up 124% from the same period a year earlier.

US Democratic presidential hopefuls denounced the conditions depicted by the report.

"No human being deserves to be treated like this," Senator Kamala Harris wrote on Twitter. "This is abuse, it's dehumanization, and it's not who we are as a country."

"Sickening. Human beings are being herded like animals right now in our country," Senator Elizabeth Warren tweeted, while Senator Bernie Sanders wrote that those in charge of the detention centres "do not respect basic human rights".

Mayor Pete Butigieg tweeted that he was "outraged by these photos," and Senator Corey Booker wrote that "this report is nothing short of horrific".

The report comes as the White House and Customs and Border Protection (CBP) officials pushed back against criticism from the Democratic lawmakers who toured migrant detention facilities on Monday.

Representative Alexandria Ocasio-Cortez, who visited two such centres in Texas, described the conditions as "horrifying" and said migrants were being subjected to "systemic cruelty".

"There's abuse in these facilities," the Democratic congresswoman from New York told reporters.

"They put them in a room with no running water and these women were being told by CBP officers to drink out of the toilet."

White House counselor Kellyanne Conway told Fox News that was an "outrageous claim".

"Everybody who has control over that facility, or control for the Border Patrol, has said that's not true, they've not heard of this," Ms Conway said.

CBP deputy commissioner Robert Perez, appearing on CNN, said the detention centres were "never designed to deal with the volume of migrants coming our way" and the Border Patrol is doing its best to deal with "absolutely oversaturated conditions".