Image copyright Her Majesty's Inspectorate of Prisons Image caption Graffiti dating from 2006 on the back of a cell door at Guildford Crown Court in Surrey

Conditions at cells in courts in England and Wales are an "accident waiting to happen", a report has said.

Prison inspectors found "squalid" cells covered in sexist and racist graffiti including swastikas, and a "dangerous" disregard for risks posed by detainees.

It comes after two people, a detainee and a custody officer, died in court buildings this year.

The Courts and Tribunals Service said it was carrying out a "deep clean" of court cell and improving procedures.

Inspectors from Her Majesty's Inspectorate of Prisons (HMIP) examined custody facilities at 70 Magistrates' Courts and 27 Crown Courts between 2012 and 2014.

Image copyright Her Majesty's Inspectorate of Prisons Image caption Dirt and stains in the corner of a cell at Lewes Crown Court in East Sussex

Image copyright Her Majesty's Inspectorate of Prisons Image caption Custody toilets in a men's cell corridor at Staines Magistrates' Court in Middlesex

The inspection team said the court custody areas they examined had some of the worst conditions they had seen.

Criticisms included:

Racist and sexist graffiti on cell walls, and filthy toilets with no privacy

Detainees without enough of their prescribed medication, and inadequate first aid kits. None had defibrillators

Provision for pregnant, elderly or disabled people "almost always inadequate"

Women, men and children transferred in cell vehicles together, exposing women to potential harassment

Serious risks, such as detainees harming themselves or others, not managed

In one case, a toilet used by defendants was next to the booking-in desk, separated only by a flimsy screen.

Many detainees were forced to spend up to 10 hours in tiny windowless rooms, while some custody conditions were so bad they posed a threat to the health of those being held - and even the staff, inspectors said.

'Serious incidents'

Since the report was drafted, a female custody officer, Lorraine Barwell, died after being attacked while on duty at London's Blackfriars Crown Court in June.

She was allegedly murdered by a prisoner. Investigations are ongoing.

In April, a 50-year-old man died at Thames Magistrates Court, east London, the first death of a detainee in court custody for many years.

Image copyright Her Majesty's Inspectorate of Prisons Image caption Graffiti on the back of a cell door at Staines Magistrates' Court

An inquest has been opened, and the Independent Police Complaints Commission is investigating the Metropolitan Police Service's contact with the man prior to his death.

Inspectors said that while the deaths could not be linked with the wider concerns highlighted in the report, they were "clear in (their) view that there is a real risk of further serious incidents in future".

Nick Hardwick, the chief inspector of prisons, has recommended ministers order an urgent overhaul of detainee treatment and conditions by the courts and tribunals service.

'No responsibility'

The most concerning was the "dangerous disregard" for the risks detainees might pose to themselves or others, he said.

"Court custody is an accident waiting to happen."

Problems stemmed from "no single organisation" and no one being prepared to take overall responsibility, either at a local or national level, inspectors said.

Image copyright Her Majesty's Inspectorate of Prisons Image caption Lack of privacy in women's cell corridor toilet at Redhill Magistrates' Court in Surrey

However, pockets of good practice showed "it is not inevitable that poor conditions and degrading, unsafe practices will prevail", the report found.

The Courts and Tribunals Service said a programme of deep cleaning was underway.

It is working with agencies including Serco, GEOamey, Prisoner Escort and Custody Services and the National Offender Management Service to improve the management of court custody areas, it added.