For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

One morning in February, Brittney, a baby-faced 17-year-old with short black braids, stands in front of a juvenile court judge in Compton, California, talking about kittens. Brittney had been in and out of the justice system since she was 14, after the state removed her from her physically abusive mother. Diagnosed with post-traumatic stress disorder, Brittney bounced from group homes to foster care to the streets. She got involved with sex work. She’d been convicted of burglary and attempted robbery; in one incident, Brittney tried to steal a cellphone from a woman sitting at a bus stop with her 3-year-old.

But today, Brittney is telling the judge about cats and her work with the veterinary program at the juvenile detention center in the Santa Clarita Valley, where she has spent the last six months. “It sounds like you found something that really interests you,” says Judge Catherine Pratt, who has seen Brittney (not her real name) in her courtroom on and off for several years. After detailing Brittney’s next steps—she’ll be released from the center and placed in a group home, where she’ll remain on probation—Pratt looks down at her from the bench. “I’m really proud of you, Brittney,” she says. “I hope you’re proud of yourself.” Brittney flashes a wide grin.

This is the STAR Court—Succeeding Through Achievement and Resilience—a groundbreaking program for sex trafficking victims under 18, and those at risk of being trafficked, who have gotten caught up in the legal system for crimes like robbery or assault. As in typical juvenile courts, Pratt doles out sentences to kids (most of whom are girls). But the similarities end there; her courtroom feels more like a counseling session than a judicial hearing, and her rulings are squarely focused on rehabilitation. Social workers bring cupcakes for girls’ birthdays.

Pratt often attends their high school graduations and gives Walmart or grocery store gift cards to girls who are trying to get back on their feet after having every aspect of their lives controlled by a pimp. “What can we do for you?” is a common question from Pratt. If girls fulfill the conditions Pratt sets—going to school, getting a job, staying out of trouble—their criminal records may be wiped clean.

Pratt created the court in 2012 based on the premise that children who have been sold for sex aren’t like other juvenile defendants, and that the trauma of their experiences should be taken into account when considering their cases. A growing body of research supports this approach. Kids are more likely to engage in high-risk behavior if they’ve experienced the types of trauma prevalent among victims of sex trafficking. “Their decision-making is in survival mode,” says Cathy Zimmerman, a professor at the London School of Hygiene and Tropical Medicine who studies gender-based violence. “You do what you have to to survive.”

Slowly, state legislators and advocates are pushing legal reforms and diversionary programs that reflect the understanding that kids shouldn’t face a lifetime of consequences for decisions they made while their brains were still developing. Overall, the number of girls and boys in the juvenile justice system is decreasing. But even though girls make up less than a third of the nation’s roughly 800,000 juvenile arrests each year, they are the fastest-growing share of these arrests.

Judges need to stop “seeing these kids as bad girls and understand that these are victims of child sexual abuse.”

Despite this evolving approach to juvenile justice, children and teens who are trafficked are often still treated as perpetrators, not victims. Twenty-seven states criminalize juveniles for prostitution, even though they cannot legally consent to sex. Some young sex trafficking victims are locked up for years for other crimes, including violence against their abusers. The best-known example is Cyntoia Brown, who received a life sentence for first-degree murder in 2006 after she killed the man who had solicited her for sex when she was 16. In January, following a national campaign, she was granted clemency by then–Tennessee Gov. Bill Haslam. Brown walked free on Wednesday after 15 years behind bars. Judges need to stop “seeing these kids as bad girls and understand that these are victims of child sexual abuse,” says Yasmin Vafa, executive director of Rights4Girls, a human rights organization focused on ending gender-based violence. “We have a long way to go.”

An exception to this criminalizing impulse is the STAR Court, where girls are diverted from traditional juvenile courts to be sentenced or, if they’re already serving a sentence, to access the counseling and other resources that Judge Pratt’s court offers. The girls’ hearings, which happen as frequently as every month, usually start with a casual, off-the-record check-in with Pratt. Girls are accompanied by a lawyer and often a host of social workers and representatives from the support programs that work with the court. Pratt, who plays a hybrid role of judge, mentor, and therapist, sees herself as one of the few people in the system whom the girls can trust—“someone who’s honest, straightforward, consistent.”

It seems to be working: 555 children and teens have been through STAR Court since its inception. Between 2014 and 2017, three-quarters of participants were not rearrested on prostitution-related charges in Los Angeles County after completing the program. In the past five years, about 70 percent of girls who went through the program graduated from high school on time. Pratt has consulted on at least a dozen programs like hers across the country, from Houston to Philadelphia. “When the girls come to us, there’s been a lot of instability in their lives,” says Judge Marian Gaston, who has overseen a similar program in San Diego since 2018. “Once you have that foundation of trust and respect and genuine care, then you can do the real work.”

Not everyone holds these courts in high esteem. Critics argue that these diversionary programs reach victimized girls too late and that resources should focus on what pushes girls into sexual exploitation in the first place. Daniel Macallair, executive director of the Center on Juvenile and Criminal Justice, says the discretion that judges have in special court programs, combined with courts’ historical tendency to treat girls more harshly than boys, could lead to unfair results. “There’s a tendency to see girls as needing more protection, so in the name of helping them, we could end up subjecting them to more restrictive treatment,” he says.

Judge Pratt is aware of this criticism. “There is a faction out there who very strongly believe that these kids are victims and that there is never an appropriate time to have them at juvenile hall, regardless of what else is going on with them,” she says. “I don’t necessarily agree with that. I think they have a good point, but there are a lot of factors.” While girls who come before her are usually placed with a family member or in a residential treatment facility, she won’t hesitate to put a girl in juvenile hall if she thinks the girl needs a more restrictive environment.

On the morning of Brittney’s hearing, I visit Pratt in her office as she reviews her docket for the day. She expects to see 10 young women, but girls often pop in unannounced to check in or just say hello. One of the girls on the list is Erin, a 16-year-old who was arrested for theft five times before she came under Pratt’s supervision two years ago. In the courtroom, Erin (a pseudonym) excitedly tells the judge about her new job at Goodwill and her latest report card: two As and two Bs. Pratt makes some small talk about thrift store donations inspired by Tidying Up With Marie Kondo, Netflix’s hit show about organizing, before announcing that Erin’s record will be cleared. “I’m very, very proud of you. Can I give you a hug?” Pratt asks. She steps down from the bench, and they embrace.