For a few years now, Mississippi’s juvenile justice system and the U.S. Department of Justice have been close acquaintances for all the wrong reasons.

One of the first encounters came in 2002, when the justice department looked into two of the state’s facilities for holding juvenile offenders—the Columbia Training School and the Oakley Training School—and discovered harmful conditions, such as sanitation issues and a lack of resources for mental health. In the end, the state went on to close Columbia and submit to federal inspections at Oakley.

Mississippi didn’t stop there. The state took the investigation as an impetus to take a holistic approach to reforming the rest of its juvenile justice system. One key ingredient in this effort is an amendment to a state law that gives 17-year-olds charged with felonies a second chance at rehabilitating their lives.

The amendment was “in response to the Department of Justice being down here working on some juvenile justice issues,” said state Sen. Gray Tollison, the chief sponsor of the amendment. “We were trying to improve our juvenile justice system, and I think this was a step in the right direction.”

Before the amendment went into effect July 1, 2011, Mississippi sent all 17-year-olds charged with felonies to adult courts but now moves most nonviolent 17-year-old offenders back under the jurisdiction of the juvenile system.

But the amendment makes a few exceptions: 17-year-olds who commit acts punishable by life imprisonment or death, such as murder, will remain within the adult court system, as well as those who commit crimes with the use of a deadly weapon. And juvenile court prosecutors can petition a judge to transfer youth back to adult court.

“The adult criminal court is no place to put children,” said Liz Ryan, the executive director of the Campaign for Youth Justice. “It doesn’t have the kind of accountability that the juvenile justice system has, it doesn’t have the kinds of services and treatment that are developmentally appropriate for children, [and] it places them at serious risk of harm in adult facilities and jails.”

Only a few months before the amendment went into effect, the state was reminded of what could go wrong when juvenile offenders were treated as adults. In late 2010, the justice department accused Walnut Grove Youth Correctional Facility, designed to house male inmates who were up to 22 years old and convicted as adults, of multiple wrongdoings—including the use of excessive force and the presence of inappropriate sexual relations between staff and youth. A consent decree was later signed, and the facility was prohibited from housing any inmates younger than 18.

Tollison said by transferring most 17-year-olds back to the juvenile justice system, the state can help these teens rehabilitate and prevent them from becoming “revolving door” criminals. “If you send them into the adult system, basically you’ve thrown your hands up and given up,” he said.

Ryan added that when states place 17-year-olds in the adult court, it leaves a permanent scar. “There’s a lifelong negative repercussion of being in adult court that follows that young person for the rest of their life,” she said. “They get an adult felony conviction that follows them everywhere. They can’t get into school. They can’t apply for loans. They can’t live in public housing. They can’t apply for certain jobs.”

Those who do go through the juvenile justice system in Mississippi have access to programs for mental health and rehabilitation through the Mississippi Department of Human Services. One such offering is the Adolescent Opportunity Program, which provides resources such as counseling and tips on filling out job applications.

Since the amendment went into effect in fiscal year 2012, the adult court has seen fewer 17-year-olds indicted—66 compared with 173 in fiscal year 2011—according to the Mississippi Administrative Office of Courts.

Angela Robertson, an associate director of the Mississippi State University’s Social Science Research Center, analyzed data from a database called the Mississippi Youth Court Information Delivery System and found that 17-year-olds are making up a growing share of teens placed in youth systems for felonies. A year before the amendment went into effect, 17-year-olds made up 12.3 percent of all youth “referred” to 51 of the state’s youth courts for felony. During the subsequent 12 months, they made up nearly a third—29.4 percent—of those referred to the same courts for felony.

Jody Owens, the director of the Southern Poverty Law Center’s Mississippi office and one of the advocates behind the bill, said there initially was some hesitancy toward the amendment.

There “was some opposition that 17-year-olds … would overrun the system, and the system itself would not be able to handle those kids,” he said.

Owens added that many 17-year-olds often commit nonviolent or minor offenses, such as fighting in school or possession of small amounts of narcotics, and their lives should not be tarnished for “kidlike behavior” or errors made when they’re young.

“We found that, by passing this bill, there was not a burden on the juvenile justice system, but more kids are given the opportunity to be redeemed and rehabilitated—which is a common goal that we all share,” he said.