MADISON, Wis. (AP) — A federal judge branded Wisconsin's juvenile prison for boys as a "troubled institution" on Thursday, saying it puts too many inmates in isolation and over-relies on pepper spray and shackles when other less intrusive alternatives to control behavior could be used.

But U.S. District Judge James Peterson said he didn't know if the solution was to immediately bar those practices as the American Civil Liberties Union and Juvenile Law Center are seeking in a lawsuit filed on behalf of current and former inmates. The lawsuit argues the practices are unconstitutionally cruel and unusual punishment.

Peterson told attorneys following a daylong hearing that he wants to maintain safety at the Lincoln Hills and Copper Lake prisons and doesn't want to overreach with whatever he orders on Friday. Peterson said he also believed the Department of Corrections wanted to reduce use of the disciplinary tactics but wasn't moving quickly enough.

"The state just seems to be have been moving very, very slowly in the face of widespread criticism of Lincoln Hills," he said. "I do see progress, but I do also see some pretty severe harms. ... I think it's pretty clear that Lincoln Hills is pretty troubled institution and that should come as no surprise to anyone."

Federal investigators for more than two years have been probing allegations of widespread inmate abuse at the prisons in Irma, which is about 155 miles north of Madison. No one has been charged.

Evidence at the hearing including the airing of two videos where young inmates were pepper sprayed after repeatedly refusing to comply with orders of guards. In one, a girl is rocking back and forth in a hallway and refusing to return to her cell. In the other video, a boy who is in his cell refuses to pull his arms inside a small opening in his door used to distribute food and medicine.

Vincent Schiraldi, an expert witness for the ACLU, said there was no imminent threat in either case and there were multiple options other than pepper spraying to de-escalate those and other situations.

Schiraldi, who previously ran the juvenile corrections system in Washington, D.C., and is now a criminal justice researcher at the Harvard Kennedy School, also said that the youth prisons send too many inmates to solitary confinement for too long. Prison logs showed some were kept there for seven or more days in a row and didn't get any time outside of their cell in a 24-hour period, he said.

Schiraldi testified that using pepper spray, keeping juveniles in isolation and shackling them does not improve safety at prisons.

Brian Gustke, security director at Lincoln Hills and Copper Lake, testified that he wanted to reduce the amount of time that juveniles are in solitary confinement, but there are impediments. He said those included high turnover and vacancies in prison staff that leads to forced overtime, not knowing schedules and "confusion on everyone's part, staff as well as the youth."

He defended the tactics used by guards as a way to maintain the safety and security both of staff and inmates, while admitting that the policies that lead to someone being put into solitary confinement could be improved.

"You have to have order in a correctional facility," he said. "There are rules. Those rules have to be followed."

As of Wednesday, 20 of the 173 inmates at Lincoln Hills were in segregated units, Gustke said.

The superintendent of the youth prisons, Wendy Peterson, said the goal is to reduce the use of pepper spray, solitary confinement and shackles.

"We realize it's not the best thing for kids," she said, adding that what they need programming and a long-term plan.

The judge said there has been a lack of programming and mental health care for the inmates, but he's not sure if the state can be trusted to "move along as it chooses."

Peterson allowed the showing of the videos after a coalition of news outlets objected to an attempt by attorneys to close the hearing while the videos were shown because the inmates could have been identified. The Associated Press, the Milwaukee Journal Sentinel, the Wisconsin State Journal, the Wisconsin Newspaper Association and the Wisconsin Freedom of Information Council all join together to ask the judge that the videos be shown in open court. The judge required anyone wishing to view the videos to sign an agreement that they would not identify the juveniles.

___

Follow Scott Bauer on Twitter at https://twitter.com/sbauerAP