D.C. Council member Charles Allen (D-Ward 6). (Ricky Carioti/The Washington Post)

DESPITE DRAMATIC changes in the District's criminal-justice system since 1985, when the Youth Rehabilitation Act was passed, the law giving young-adult offenders a second chance remained unchanged and largely unexamined. How big of a mistake that was became apparent with a Post investigation last year that revealed a pattern of violent offenders returning to the community and committing more crimes. It's encouraging, then, that the D.C. Council now appears ready to correct that mistake with needed changes to the law.

A bill written by Council member Charles Allen (D-Ward 6) and supported by seven other members of the 13-member council, including Chairman Phil Mendelson (D), provides for a comprehensive overhaul of the controversial law. After The Post's revelations, Mr. Allen, chairman of the council's judiciary committee, held a hearing and convened a summer working group of crime victims, ex-offenders, youth advocates and representatives from government agencies and the mayor's office.

The result is thoughtful legislation that aims to balance different interests. It rightly preserves the worthwhile goal of rehabilitation for defendants 21 or younger, allowing them to learn from their mistakes, change their ways and not have their futures burdened with a criminal record. But the Youth Rehabilitation Amendment Act of 2017 would temper this leniency with common-sense protections for public safety. Certain violent crimes, such as first-degree sexual abuse, would be added to offenses ineligible for the act. Judges would make the decision about whether to set aside a conviction after the full sentence has been served instead of when it is handed down. There would be new transparency in sentencing by requiring judges to put in writing sentencing decisions that deviate from established guidelines. And because victims of crime are often overlooked, it’s good to see requirements to help guide them through what can be a trying criminal-justice process.

Even though a majority of the council signed on to the bill’s introduction, passage is by no means assured. Co-sponsors have been known to fall off as debate progresses, and it will be important to hear feedback from judges, defense attorneys and other stakeholders to determine if further refinements are needed. An especially critical area is addressing the absence of supports and services that are key to helping rehabilitate young people. The legislation directs the mayor — said to be generally supportive of Mr. Allen’s efforts — to create vocational and rehabilitative programs for young offenders, but that may not help those convicted of felonies who are placed in the custody of the Federal Bureau of Prisons and housed in facilities all across the county. The District can’t control what programming will be available to them. That underscores a major problem in the administration of justice in the District: the lack of cooperation between local and federal officials in the hybrid system.

“Better services mean better public safety outcomes,” argued Mr. Allen, so let’s hope agreement can be found on how to help these young offenders so that they can return home and successfully reenter the community.