In a study published in the journal Pediatrics, researchers say there's a strong association between juvenile detention and diminished physical and mental health later on in life.

The study's authors analyzed data from about 14,000 adults in a federally funded data set called the National Longitudinal Study of Adolescent to Adult Health. They looked at the relationship between the length of incarceration as a youth and their adult health. They also controlled for several factors, including baseline health and socio-demographic factors.

The authors concluded that youth incarceration is associated with worse physical and mental health later in life.

Mental health outcomes also deteriorated the longer someone was incarcerated, said study lead author Elizabeth Barnert at UCLA.

"I think that being in the justice system is often very traumatic for young people. The juvenile justice system was intended to be rehabilitative, but it has become increasingly punitive," she said, adding that the relationship between health and incarceration is complex.

Jessica Feierman with Philadelphia's Juvenile Law Center said she's not surprised by the research. Conditions at juvenile facilities are often harsh, she said.

Kids are "separated from their families. They may be placed in solitary confinement, they may be experience shackles or pepper spray," she said.

The study findings are consistent with her experience working with youth who were held in solitary confinement.

"They have described their reaction as feeling more agitated, more aggravated, less able to control their tempers, high levels of stress," Feierman said.

For 10 years, said Feierman and Barnert, the trend in juvenile justice is to keep more kids out of facilities and in their homes and communities.

Hannah Klein, a doctoral candidate at Temple University's department of criminal justice, pointed to the Juvenile Detention Alternatives Initiative as a successful program that aims to divert youth from secure facilities.

"They try to divert as many kids out as possible, and they try to come up with different alternatives, and they work with ... more partners," she said, including judges, the school district and other community stakeholders.