At some point, youthful indiscretions become crimes punishable by jail time. But identifying that critical point is a challenge.

For more than a decade, South Carolina has been getting closer and closer to getting it right. The state’s population of incarcerated young offenders dropped 67 percent between 1997 and 2011.

It’s a move in the right direction for several reasons:

Youthful offenders are more apt to be rehabilitated if they are monitored and guided in the community than if they are behind bars.

The cost of incarcerating youthful offenders is steep. Many states spend around $100,000 a year per offender, according to a recent Pew study.

And the state’s prisons are overcrowded, with the cost of building new ones, formidable.

Indeed, when Judge William Byars became director in 2003, the feds had been monitoring the Department of Juvenile Justice as a result of a lawsuit alleging overcrowding, physical abuse and inadequate medical care at DJJ’s three prisons.

Mr. Byars pushed for reforms of a system he said was counterproductive and disgraceful.

That is not to suggest that no youthful offenders should be incarcerated. Some do. Their actions and attitudes make it clear that they are poor candidates for rehabilitation in group homes or wilderness camps.

But many young people make lousy decisions that put them on the wrong side of the law. They show poor judgment, but they don’t need to be locked up with hardened criminals who expose them to a warped perception of life.

Margaret Barber, who worked with Mr. Byars and became DJJ director in 2011, is delighted that South Carolina is among 10 states that have reduced their juvenile prison population the most. South Carolina, with its 67 percent decrease, has surpassed the national average of 48 percent between 1997 and 2011.

The Pew report said of the state’s 426 youthful offenders committed to confinement in 2011, 126 were housed in a prison. Last week, Glenn Smith reported that the number was 105.

The number being rehabilitated through other programs and community partnerships is far greater.

But DJJ is making strides even in the prison settings where more emphasis is placed on providing education, vocational skills and tools for rehabilitation.

Sadly, juveniles continue to commit crimes and citizens continue to question or despair over what to do about it.

There is not one easy answer. Putting youthful offenders in prison is one answer for extreme cases. But far more young people benefit from less restrictive programs with more rehabilitation.

And when the young people benefit, the state’s communities benefit too.