Instead, Shaquille — who spoke on condition that his full name not be used, lest his record jeopardize his chances of finding a job — wound up in San Francisco’s Young Adult Court, which offered him an alternative.

For about a year, he would go to the court weekly to check in with Judge Bruce E. Chan. Court administrators would coordinate employment, housing and education support for him. He would attend weekly therapy sessions and life-skills classes.

In return, he would avoid trial and, on successful completion of the program, the felony charge would be reduced to a misdemeanor. This was important, because a felony record would make it nearly impossible for him to get a job.

“These are transitional-age youth,” said Carole McKindley-Alvarez, who oversees case management for the court. “They’re supposed to make some kind of screwed-up choices. We all did. That’s how you learn.”

Surprisingly, this alternative legal philosophy springs not from concerns about overcrowded prisons or overburdened courts, but from neuroscience.

Researchers have long known that the adolescent brain is continually rewiring itself, making new connections and pruning unnecessary neurons as it matures. Only recently has it become clear that the process stretches well into early adulthood.

Buried in that research is an uncomfortable legal question: If their brains have not fully matured, how responsible are adults ages 18 to 24 for their crimes?

Should they be treated more like adolescents, handled in the comparatively lenient juvenile system, or more like hardened 35-year-olds? Should young adults be held fully responsible for certain crimes but not others?

After attending a lecture at Harvard on brain development, George Gascón, the San Francisco district attorney, decided to tackle these questions head on. In 2015, he and Wendy Still, then the city’s probation chief, established Young Adult Court, a hybrid of the adult and juvenile justice systems tailored to the biology and circumstances of offenders 18 to 24.

Mr. Gascón and his colleagues argue that neurological immaturity may contribute to criminal behavior. Adult sentences constitute cruel and unusual punishment, they say, and undermine the possibility of rehabilitation.

Photo

A composite brain scan of a group of individuals, ages 21-24, asked to engage in impulse control. Credit
Jason Chein and Laurence Steinberg/Temple University

Trained by a clinical psychologist in recent neuroscience, members of the court’s staff are trying to apply the scientific findings to prevent lifelong entanglement with the criminal justice system.

“It’s an opportunity demographic, is what it is,” Judge Chan said. “This is a really malleable group of people with tremendous capacity to change.”

The Developing Brain

For most of the past century, scientists assumed brains were fully developed by age 18. Then, in 1999, Dr. Jay N. Giedd of the National Institute of Mental Health published a study in Nature Neuroscience that challenged this view.

He used M.R.I. scans to track the brain development of 145 people ages 4 to 22. The study was intended to explore structural changes during the transition from childhood to adolescence, but Dr. Giedd found that neural connections continued to be refined well past age 18.

Over the next decade, other researchers confirmed that the brain seems to undergo a burst of growth and connectivity after age 18, but few experts pursued those observations. In 2012, a comprehensive analysis of brain development omitted data on young adults ages 18 to 21 because so few studies had been done.

But if neuroscientists were not interested in the implications, legal scholars were. A series of Supreme Court rulings — most notably Roper v. Simmons in 2005, which abolished the death penalty for juveniles — was partly based on science suggesting that adolescent brains are not fully developed. This continuing process, the justices reasoned, diminished culpability and justified sentencing that was less harsh.

Laurence Steinberg, a psychologist at Temple University, set out to determine when exactly an adolescent becomes an adult.

Dr. Steinberg gave psychological tasks to 935 people ages 10 to 30 to distinguish between cognitive capacity and “psychosocial maturity.” His team reported that people performed as well as older adults on cognitive tasks — such as recalling 13-digit numbers forward and backward — by age 16.

Yet psychosocial maturity — measured by impulsivity, risk perception, thrill-seeking, resistance to peer influence — did not begin until age 18, gathering momentum through the early 20s.

“It appeared that these two traits might develop on different timelines,” Dr. Steinberg said.

In 2011, the MacArthur Foundation organized a group of legal scholars and scientists, including Dr. Steinberg, to study criminal justice and young-adult brains in more detail. It was no secret that the criminal justice system’s approach to young adults was not working.

Young adults 18 to 24 make up 10 percent of the population, but they account for 28 percent of all arrests (2.1 million in 2015), a rate higher than that of any other age group.

Arrest rates are particularly high among minority males: Nationally, about half of all black men have been arrested by age 23.

Convictions at this age often are the harbingers of derailed lives: 84 percent of young adults released from prison will be rearrested within five years. Few with felony convictions will be able to find jobs.

A court informed by biological research could play a role in bringing down those numbers, Mr. Gascón hopes, even if most of these offenders face considerable economic and racial barriers.

New research funded by the MacArthur Foundation’s initiative hints at the developmental challenges of young adults.

In February 2016, Alexandra O. Cohen, a neuroscience graduate student at Weill Cornell Medical College, and other researchers including Dr. Steinberg published one of the initiative’s first papers in Psychological Science, linking brain activity to behavior in young adults in emotionally charged situations.

An error has occurred. Please try again later.

You are already subscribed to this email.

Some 110 subjects ages 13 to 25 were given a simple task to be performed under one of three conditions: the promise of a $100 reward, the threat of a loud noise, or neither. Brain scan data collected during the task showed that emotional centers of the brain were in overdrive. But there was less activity in areas like the dorsolateral prefrontal cortex, which contributes to self-control.

Ms. Cohen suggests the data mean that young adults are just as capable of restraint as older adults, except when a threat is present.

Her team’s results bolster earlier findings that the brain does not mature all at once. The neural systems governing logical thought, or “cold cognition,” reach adult levels of maturity well before those that manage thinking in the heat of the moment.

The teenage brain has been likened to a speeding car with no brakes. In young adults, on the other hand, “there are brakes, but it’s more like the brakes might not work when the road is bumpy,” Ms. Cohen said.

In a study published in February of this year in Developmental Cognitive Neuroscience, Ms. Cohen and her collaborators used the impulse-control test to predict the “emotional brain age” of individual participants. Later, they assessed each person’s preference for taking risks.

People with a younger “emotional brain age,” regardless of chronological age, tended to prefer riskier behavior. But the variability was highest among young adults.

“If you pick a random 18- to 21-year-old, you have no idea what level of maturity you’re going to get,” said Dr. Steinberg, a co-author of the study. “So in this period with the most variation, why would the law draw a bright line right there?”

Currently, a few states are considering legislation to move that line by trying anyone under age 21 as a juvenile. San Francisco’s experiment in placing young adults into a separate category, neither juvenile nor fully adult, “is a smarter approach, and one that’s more consistent with the science,” Dr. Steinberg said.

The Court in Session

On a recent Tuesday, staff members at the Young Adult Court huddled in a small, windowless courtroom, reviewing cases. Judge Chan sat at the head of the weathered wood table; the prosecutor and public defender, adversaries in the regular court, sat so close they could have read each other’s files.

Along with three case managers and two probation officers, they discussed how one defendant would pay for clothes for a coming job interview, how another might get a ride home from court that day. Judge Chan decided to issue a warrant for a defendant who had missed his court appointments.

A few minutes before court was to begin, the meeting adjourned. The judge put on his robe, and about 40 young adults filed in through the double doors in the back.

The judge gave children’s books to a young woman who was about to “graduate” and had recently had a child. He ordered a young man in an orange jumpsuit, newly admitted to the program, back to jail.

As of this February, 45 percent of participants in the court’s first cohort have “graduated,” their charges dropped or reduced. Most of the graduates are on an “aftercare” plan but are not actively followed.

Judge Chan calls that a success. “It’s a broader view of public safety,” he said.

“You get the guy who breaks into the car, and if I incapacitate him for a year, what’s he going to do when he gets out? He’s going to be the same, a little bit older maybe. But he’s going to start breaking into cars again.”

Not everyone is sold on the court’s approach.

“The reality is that the criminal justice system is littered with well-intentioned programs that sound like great ideas but have not been as effective as originally hoped,” said Charles Loeffler, professor of criminology at the University of Pennsylvania.

Until there is more evidence to show the program works, he said, “my attitude is skeptical hope.”

Despite the lack of data, young adult courts are gaining traction. Last year, the federal National Institute of Justice tallied six such courts around the nation, in places as diverse as Idaho, Nebraska and New York.

The Center for Justice Innovation, a British charity, is about to start a pilot program of five young adult courts in England and Wales. Staff members visited the San Francisco and New York courts in February to learn more.

The San Francisco court “is the type of model we would want to see,” said Brent J. Cohen, a former senior policy adviser at the Department of Justice, now managing director of Public Service Consulting Group. “I think it’s probably the first model in the country that really takes into account the neuroscience and does robust training for its staff based on that.”

Shaquille is scheduled to graduate in the next few months. He plans to continue pursuing his ambition to become a licensed security guard — a dream that would evaporate with a felony record.

While he regrets impulsively punching the other driver, he said the court’s therapy classes had helped him with emotional restraint. “When things get overwhelming,” he said, “I can look at things before I react.”

A few months ago, after meeting with a case manager to fill out housing applications, Shaquille heard someone yell a racial epithet at him on a street corner. Shaquille felt the anger well up, but this time he kept walking.