As the salutatorian of Boys and Girls High School, Johanna Jimenez will deliver a speech tonight titled “A Race Called LIfe.”

For her classmates at Boys and Girls High School in the Bedford-Stuyvesant section of Brooklyn, many of whom have experienced hardships and overcome steep odds on the path to graduation, the title is a metaphor. But Jimenez, a top middle distance runner who is headed to college on a track scholarship, takes the idea literally.

“Basically, life is like a race. You set goals, then stay focused and work hard to achieve them,” she said, explaining her speech.

Jimenez’s life has been less of a marathon than a series of hurdles. She overcame her mother’s mental illness, foster homes, and her own insecurity to graduate from high school at the top of her class. There she joins another student-athlete, valedictorian Folashade Frazier, who will attend the University of Michigan.

Together, the pair provide glimmers of hope at a school that seems perpetually at risk of closure. Absorbing some of the community’s neediest students, Boys & Girls has a poor attendance rate and an even lower graduation rate. Detaching kids from their troubled personal lives is often the first hurdle teachers must clear before they can even begin instruction.

Born in Puerto Rico, Jimenez and her older brother, Nathaniel, were given up at an early age by their mother, who suffered from mental illness. She lived in three foster homes and one group home between the ages of 7 and 12.

But although her life was upended time and again during these years, she says her vision to do something great never wavered.

“I just wanted to be known,” explained Jimenez, whose 94.1 grade point average included two Advanced Placement classes in the school’s honors program.

On the track, Jimenez is nearly as elite. She was a member of the school’s city championship 3200 meter relay team. She is tall and thin with a long and powerful stride and her shy, easy-to-smile personality belies a fierce competitive drive. “She didn’t let anything get in her way from improving,” said her coach Renee Sterrett. “She’s worked so hard.”

Jimenez will run at Wheaton College in Massachusetts and has continued to train this summer. On Saturday, she and Sterrett traveled to Icahn Stadium on Randall’s Island, where she was racing the 800 meters. Sitting in the stands, Jimenez thumbed through the recent plays on her mp3 players and talked about her time in foster care. She struggled to explain how its magnitude has shaped her.

“Everything that happened in my life, it happened for a reason,”  she said, shrugging. “I guess that’s why I’m so determined.”

She wasn’t always that way. She was insecure and damaged, said Melva Fernandez, the woman who adopted her when she was 12. “I could tell that she was not treated how a human being is supposed to be treated,” Fernandez said.

Under Fernandez’s roof, Johanna found stability for the first time in her life and thrived. Fernandez is a tough-love mother who had already raised six of her own daughters. She said Johanna was, at best, a mediocre eighth-grade student.

“When she first came and showed me her report card, I saw it and I said, ‘No, this is unacceptable. That can not happen,’” Fernandez said.

By freshman year, Jimenez joined the track team and dedicated herself to studies. She also joined the dance team and drum line.

“When I saw I was doing good, I felt good,” said Jimenez, who keeps in regular contact with her birth mother. “To me, school is a getaway from all my problems. All the problems I had in my life.”

Her teachers and mentors say they believe her perseverance enabled her to overcome.

“Anything she did she always did to the best of her abilities. She stood out from day one,” Linda Fung, an English honors teacher who taught Johanna for two years. “I can say she’s one of the best students I’ve ever had.”