The UN High Commissioner for Human Rights has condemned the “undignified and damaging” conditions in which migrants and refugees are being held at the US border, calling for children never to be put in immigration detention or separated from their families.

Michelle Bachelet said she was appalled by the camps, and said that several UN human rights bodies had found the detention of migrant children may constitute cruel, inhuman or degrading treatment, which is banned under international law.

She spoke out just days after an internal US government report warned of dangerous overcrowding in many of the detention facilities.

Some immigrants were held in cells at five times their capacity, with more than half being kept outside because of the lack of space, the government report revealed.

There were only four showers for 756 detainees, according to NBC News. One cell, designed to hold 35 people, was filled with 155.

'Dangerous' overcrowding of migrants in US border facilities Show all 6 1 /6 'Dangerous' overcrowding of migrants in US border facilities 'Dangerous' overcrowding of migrants in US border facilities Photos of detained migrants crowded into cells at the US border - with one holding up a sign reading simply "help" - have been released as part of a new report warning of "dangerous" overcrowding. The memo was sent to the Department of Homeland Security by its Inspector General, containing photos taken at border facilities in the Rio Grande Valley over a week in June DHS/OIG 'Dangerous' overcrowding of migrants in US border facilities Eighty-eight adult males held in a cell with a maximum capacity of 41, some signalling prolonged detention to OIG Staff on June 12 DHS/OIG 'Dangerous' overcrowding of migrants in US border facilities Overcrowding of families observed by OIG on June 11, at a border patrol facility in Weslaco, Texas DHS/OIG 'Dangerous' overcrowding of migrants in US border facilities Migrant families overcrowding a border patrol facility on June 11 in McAllen, Texas DHS/OIG 'Dangerous' overcrowding of migrants in US border facilities Fifty-one adult females held in a cell designated for male juveniles with a capacity for 40 at Border Patrol’s Fort Brown Station DHS/OIG 'Dangerous' overcrowding of migrants in US border facilities Migrant families overcrowding a border patrol facility on June 11 in McAllen, Texas DHS/OIG

And The New York Times described a Border Patrol station in Texas as filled with hundreds of children wearing filthy clothing and packed into disease-ridden cells, based on interviews with staff and lawyers who had visited the site.

Donald Trump branded the story a hoax.

“As a paediatrician, but also as a mother and a former head of state, I am deeply shocked that children are forced to sleep on the floor in overcrowded facilities, without access to adequate healthcare or food, and with poor sanitation conditions,” Ms Bachelet, who was the president of Chile, said.

“Detaining a child even for short periods under good conditions can have a serious impact on their health and development – consider the damage being done every day by allowing this alarming situation to continue.”

The detention centres house thousands of migrants, many of whom are fleeing violence and poverty in central America.

Ms Bachelet urged the authorities to find non-custodial alternatives for both children and adults.

“Any deprivation of liberty of adult migrants and refugees should be a measure of last resort,” she said.

“In most of these cases, the migrants and refugees have embarked on perilous journeys with their children in search of protection and dignity and away from violence and hunger.

“When they finally believe they have arrived in safety, they may find themselves separated from their loved ones and locked in undignified conditions. This should never happen anywhere.”

The UN human rights office’s teams in Mexico and central America have documented numerous rights violations and abuses against migrants on the move, including the excessive use of force and family separation.

Policies introduced at the end of last year require Border Patrol to conduct secondary medical checks on all children under Customs and Border Protection care and custody, with special attention to children under 10.

Ms Bachelet also condemned action against people and organisations providing migrants with water, food, health care and shelter.

“The provision of lifesaving assistance is a human rights imperative that must be respected at all times and for all people in need – it is inconceivable that those who seek to provide such support would risk facing criminal charges,” she said.

Scott Warren, 36, from Arizona, who gave aid to migrants, will be retried after a jury last month failed to reach a verdict, and faces up to 20 years in prison for “shielding” the men from US authorities.