LOS ANGELES (AP)  A Los Angeles County jail has ended a policy of chaining inmates to a wall  sometimes for as long as 11 hours  until their bodies expel contraband.

Dozens of inmates at North County Correctional Facility in Castaic were subjected to the process known as “potty watch,” the Los Angeles Times reported Tuesday (http://lat.ms/1PuMBJo ).

Corrections experts say the inhumane practice was used to recover drugs, weapons, cellphones and other illegal items that inmates may have swallowed or concealed in body cavities.

One jail inmate, clad only in boxer shorts and socks, was handcuffed to a wall for 11 hours, according to the newspaper. Another was subjected to the treatment for as many as nine hours, causing bleeding and severe pain to his wrists.

Sheriff’s officials have referred 24 cases involving jail personnel to the district attorney’s office for possible prosecution, the Times said. So far prosecutors have filed criminal charges in only one case  the prolonged handcuffing of an inmate suspected of having a note hidden in his rectum.

Advocates for the deputies argue that it’s unfair to blame low-level officials who were simply following department policy.

The contraband watch method seems extreme, said James Robertson, a corrections consultant in Denver.

“It goes back to that statement, ‘Do the ends justify the means?'” he told the Times. “In the end, you get the contraband, but is there a better, more humane way to do it?”

The policy at North County Correctional Facility applied only to the facility, not other county jails. It stated that deputies “shall” handcuff inmates to wall brackets in a seated position and that inmates’ feet “may” also be shackled to the floor.

Department policy previously gave little guidance on how to perform contraband watches, directing each facility to develop its own rules.

At state prisons, officials have reduced the number of such watches and are exploring whether scanning technology could one day replace the treatment.