Delaware County public defenders Christopher Welsh and Lee Awbrey revealed shocking allegations this month about abusive conditions in Delaware County’s Lima youth detention facility: Staff and youth alleged, for example, that staff smashed a youth’s head into a window so hard that the glass cracked, that when a suicidal girl complained of thirst, staff pushed her head into a toilet bowl to drink, and that another girl covered in feces was denied access to a shower for days. Further allegations include that youth received just two hours of schooling a day, and children were held in mind-numbing solitary confinement, sometimes for weeks, well beyond what statute allows for, and that staff hurled racist and homophobic epithets at the youth.

To his credit, Delaware County President Judge Kevin Kelly quickly ordered that all children be transferred out of the facility, and the allegations have been referred to the attorney general and state regulators.

» READ MORE: Pa. lawmakers urge sweeping reform after Delco youth facility closure

As someone who has run youth corrections and probation in large jurisdictions, and witnessed and researched abuses of this sort in facilities throughout the country, I advise county officials to keep that facility closed and take this moment to design a community-centered approach to replace it.

When I took over youth corrections in Washington, D.C., I was confronted with atrocious conditions similar to what has been alleged at Lima. Staff routinely beat the youth, sexually assaulted them, and sold them drugs. The facility was in abysmal shape, with rats and cockroaches crawling on young people when they slept, and rooms that were freezing cold or boiling hot, jeopardizing some youth’s very lives.

The kinds of deplorable conditions found in Delaware County occur, and recur, far too often in youth facilities nationwide. The Annie E. Casey Foundation has uncovered reports of physical and sexual assault as well as overreliance on shackling, pepper spray, and extended isolation in over 80% of all states. Research by the United States Justice Department found that one out of 14 incarcerated youth reported being sexually assaulted in custody. A little over a year ago, the Delaware County-based Glen Mills School, the nation’s oldest operating youth prison, closed due to what state regulators described as “mistreatment and abuse of children in care.”

These conditions are not meted out equally in Pennsylvania or around the country. Black and Latino youth nationally are 4.6 and 1.4 times as likely as white youth to be incarcerated, disparities that are actually worse in Pennsylvania.

Because jurisdictions around the country have experienced similar atrocities, there is a national movement toward closing youth prisons, with 66% fewer youth in custody and a majority of youth prisons nationally closing since 2000. Lawmakers in San Francisco and Seattle have passed ordinances to close their remaining youth detention facilities, and last year, the state of Vermont closed its sole youth prison. New York City, a jurisdiction of 8.4 million people, averaged only seven youth in locked detention daily last year.

Indeed, prior to Judge Kelly’s order, Delaware County’s facility held fewer than 12 children and had an operating budget of over $4 million, or around half a million per child per year. A number of those young people were incarcerated not for serious offenses, but for technical probation violations and truancy.

» READ MORE: Judge empties Delaware County Juvenile Justice Center after allegations of rampant abuse

Instead of investing in debilitating youth incarceration, jurisdictions are increasingly working with people in communities most impacted by youth incarceration to design approaches to achieve safety by helping young people turn their lives around. When New York passed “Close to Home” legislation, removing all city youth from state youth prisons, it spent the savings on greatly expanding its range of community programming to support youth in their home communities. In the four years after Close to Home was enacted, youth arrests in New York City declined by 53%.

For the $4.6 million Delaware County now spends on abusive institutional conditions, it should instead actively listen to and work with people from its most highly impacted neighborhoods to invest in a robust range of supports and services that help young people thrive in their own homes and communities. That’s how any of us would want our own children treated if they ran afoul of the law, and the kids in Delaware County deserve no less.

Vincent Schiraldi is codirector of the Columbia University Justice Lab, former commissioner of the New York City Department of Probation, and former director of youth corrections in Washington, D.C.