The fight that sent Isabella to juvenile hall at age 11 was neither her first nor her last.

She spent six weeks locked up, but the shadow of the experience stretched for years. Middle and high school were marked by a series of school suspensions and transfers, fighting with schoolmates, and conflicts with her parents, says Isabella, who asked that her last name not be used. She also remained on probation for more than four years.

Then in November, Isabella met Yessenia Ruiz, a mentor coordinator with the Youth Justice Mentoring Program at the nonprofit Center on Juvenile and Criminal Justice, which supports youth who’ve had contact with the justice system. In the months that followed, Ms. Ruiz became Isabella’s go-to person for everything, from help with homework to grabbing burgers after school to relationship advice.

Her presence, Isabella says, was transformative.

“I think I've changed because I've got someone to talk to, someone that’s on my side and that would understand me,” says Isabella. Now 17, she plans to receive her high school diploma on stage next spring.

When 18-year-old Bartholomew found himself struggling not to start drinking again after his probation ended, for instance, he turned to his mentor, Arthur Garcia.

“I was spiraling a little bit,” says Bartholomew, who asked that his name be changed because he is currently looking for work. “And he went, ‘Hey, you know ... Let's get you help.’ ”

Bartholomew spent four months in juvenile hall in 2015, after police found a stash of illegal drugs and other contraband in his backpack while he was cutting class. He signed onto CJCJ’s mentoring program after his release.

“And so … [Arthur] came over to the house and we went to [an Alcoholics Anonymous] meeting,” Bartholomew says. “And in complete honesty, if he didn't come over I probably wouldn't have gone. And I thank him for that.”

It wasn’t just during the tough times that Mr. Garcia, 25, showed up for Bartholomew.

“He's got my back on everything,” says Bartholomew, who is starting his freshman year at San Francisco State University.

He runs down a list: “My scholarship applications. Applying for school. Going to orientation, he went with me. Usually your parents go; Arthur went with me. Setting up my classes. Helping me get my résumé together, look for jobs. Grow as people. And you know, learning to experience and love.”

“He's been there all the way,” he adds. “He's always been there for me.”