Loiselle Gonzalez Baez was determined not to let history repeat itself.
Years ago, her mother had been a promising student who, as a teenager, dropped out of school after becoming pregnant. So when Loiselle — first in her class at City on a Hill Charter School in Roxbury — became pregnant last summer, she was not going to let it destroy her dreams.
So minutes after giving birth to a son in late January, she sent a text to her school counselor.
“I have to come back to school,” she wrote. “I have to graduate on time. And I have to be valedictorian.”
Thursday night at Faneuil Hall, Loiselle Gonzalez Baez will graduate — as valedictorian — first in her class, with a 4.17 grade point average. She missed just 11 days of school after giving birth.
This fall she will enter Wellesley College, thanks to a combination of federal and state grants, along with financial aid. She plans to become a doctor.
“I was nervous and scared,” Baez said of learning she was pregnant. “My biggest concern was telling my parents. My mother was very shocked. . . . After a while she became supportive, once she got used to the idea.”
Her guidance counselor, Katherine Sollazzo, calls Baez the most gifted student she has encountered in her career. When Baez let her know — before the start of school, by e-mail — that she was pregnant, Sollazzo’s initial reaction was utter disbelief.
“I thought, ‘This isn’t happening,’ ” Sollazzo said. “Then I kept reading it and I thought maybe this is happening. She has a great sense of humor and I thought it was a joke. Nobody even knew she had a boyfriend.”
The two immediately went to work on a plan for Baez’s pregnancy. Since she wasn’t due until late January, graduating on time was a realistic possibility, with enough support. The horrible winter weather, with all the snow days that piled up, helped cut down on the time she missed from class.
The baby’s paternal grandmother became his day-care provider while Baez was in school every day. She tried to return even faster than she did, but Sollazzo wouldn’t let her.
When Wellesley administrators discovered that one of its incoming freshmen was a new mother, they worked with Baez to see how they could ease the transition. Though first-year students typically are required to live on campus, she will be allowed to live at home in Hyde Park. Baez has applied for a slot in the college’s day-care program, which is mostly used by faculty members. She will be allowed to plan a schedule that is compatible with child care.
“Definitely I knew it would be more difficult [with a child],” she said. “I think it will be difficult, but because Wellesley has already demonstrated so much support, I think it will be doable.”
Baez said she doesn’t know what she wants to study as an undergraduate. Her ambition to become a doctor came about, she said, during a visit with family in the Dominican Republic. Though she was young at the time, she noticed at a local hospital that the medical staff didn’t seem to have much time to care for their patients.
“I saw the bad quality of the hospital and the apathy of the doctors and decided I wanted to be a doctor. They just weren’t giving the time the patients needed. They weren’t connecting with the patients and giving them the time they needed.”
I asked her school counselor how such a smart young woman found herself in this, well, awkward position. She chuckled like a person who deals daily with adolescents — and knows that even brilliant teenagers are still teenagers.
“One of the first things she told me was that the information in health class never really sank in,” said Sollazzo. “They never think it will happen to them.”
The school is actually overhauling its sex ed curriculum as a result of this, figuring that if it isn’t reaching the school’s best student, it probably isn’t reaching other students either.
For Baez, one of the challenges of senior year was dealing with the inevitable high school gossip surrounding her pregnancy. Sollazzo took care of telling her teachers, and Baez talked to her classmates until they moved on to some other preoccupation.
When I asked about the topic of Thursday night's valedictory address she replied, “Having a baby!’”
Her message to the class of 2015: “Don’t give up despite obstacles. Be determined. Don’t worry about people judging you and saying negative things about you.”
It’s a message sure to resonate with the peers who have watched her live it.
Adrian Walker is a Globe columnist. He can be reached at firstname.lastname@example.org.