Serious concerns have been raised in a new report into the use of a London court's cells during the prison overcrowding emergency this summer.
Detentions hit record numbers - the prison service resorted to court cells
The courts and prisons watchdogs criticised the use of "inadequate" cells to hold prisoners.
Holding prisoners there for a whole weekend was condemned, as were the inappropriate facilities and food.
A Ministry of Justice spokesman said West London Magistrate Court's cells had only been used as a last resort.
In their report - the first into the emergency - Anne Owers, chief Prisons Inspector, and Eddie Bloomfield, chief inspector of Courts Administration, said their team had inspected the court's facilities on 13 June.
Some 150 prisoners had been housed at the court the previous month.
More than 400 people were being held in police cells under Operation Safeguard, emergency procedures triggered as prisons reached capacity. But as police cells filled up, more prisoners were moved into the least preferred option - court custody suites.
Speaking to the BBC, Ms Owers said: "We know that the early days of custody are when people are at their most vulnerable and for that reason prisons have developed various support mechanisms.
"Healthcare checks, risk checks, special first night centres, proper detoxification to reduce that risk. Those facilities aren't and weren't available in court cells.
"Court cells are only designed to hold people for a couple of hours, they're not designed to hold people overnight or, as was happening at west London, sometimes over the weekend."
Signs of suicide
The watchdogs for England and Wales found prisoners were held at the cells at West London Magistrates' Court over weekends because there were no spaces elsewhere.
Inspectors praised staff for how they looked after the prisoners - but said the regime fell well short of standard prison procedures.
PRISON POPULATION 15/06/07
In prison: 80,538
In police/court cells: 413
Spare places: 507
Source: Prison Service
Prisoners arriving at the suite were not screened for warning signs of suicide contrary to established practice in jails for new inmates.
And Ms Owers said courts lacked "diversion schemes" to direct mentally ill people to more suitable accommodation.
Cells were bare with no natural light. Prisoners could neither exercise nor smoke. Some had been transported all over the country to find a cell, the inspectors said.
In one case a prisoner arrived at 1.30am from Birmingham. He left in the early hours to return to the Midlands - something inspectors said was unacceptable.
Prisoners could not contact families directly and showers were inadequate. Some prisoners went back to trial in clothes they had worn the previous day.
Food was so basic inspectors heard that some staff had bought fruit out of their own pockets for prisoners held over the weekend.
Paul Cavadino, chief executive of crime reduction charity Nacro, agreed with the report, saying the use of court cells was "unacceptable in a civilised society".
"A court cell is little more than half the size of a cell in a Victorian-built prison," Mr Cavadino said.
PRISON POPULATION 17/08/07
In prison: 80,629
In police cells: 64
Spare places: 904
Source: Prison Service
"These are the worst possible conditions for a prisoner with a mental disorder."
He called for sentencing to be reformed to reduce pressure on prison space, requiring courts to pass "fewer and shorter jail sentences except for dangerous offenders".
The prison population has eased from a record of just over 81,000 in June after the introduction of an early release scheme and more prison cells.
As of 17 August there were almost 80,700 people in jail with 904 spare places available in prisons and police cells.
A Ministry of Justice spokesman said: "We used court cells as a measure of last resort when accommodation in prison and police cells [Operation Safeguard] was exhausted due to exceptional prison population pressures. We have not used them since 20 June."