Just months ago, Trinity Fletcher was homeless, a teenager living in a tent in the woods, her hair often freezing against a torn c­anvas cover.

But last week, this young woman who drifted through foster care, fled an unstable home life and lived in a supermarket restroom before making a tent her home for nearly two years, was awarded her high school diploma. Members of the Anoka-Hennepin School District faculty glowed and a few grew misty-eyed as Fletcher clutched her diploma, whispering to herself, “I did it! I did it!”

Last year in Minnesota, 486 high school seniors identified as homeless graduated from public schools, according to the state Department of Education. For most students who end up homeless, though, the odds against their ever finishing school are daunting.

Fletcher’s story may be the ultimate it-takes-a-village tale of inspiration, thanks to key faculty members who came to her aid after she dropped out of school.

“If you had described her situation to me without telling who we were talking about, I would have said, ‘No, not in a million years would a homeless student who dropped out of school and lived in a tent for two years earn her diploma,’ ” said ­Karrie Schaaf, the homeless youth and ­families liaison for the Anoka-Hennepin School District.

Schaaf has been dealing with homeless kids for decades. “Trust me,” she says, “Trinity’s story is off the charts.”

Fletcher, 20, said that her graduation from Transition Plus, an alternative school in the Anoka-Hennepin district came only after she realized that “I wanted to start a life. I wanted a future. I needed to get my diploma.”

It’s a rallying cry that will be echoed throughout large auditoriums and modest halls this graduation season. But the path Fletcher took is so different from the one taken by Minnesota’s other 57,680 public high school graduates this spring.

She began life as Trina Petersen. Her biological parents were both 17 and in high school when she was born. They never married and split up before their daughter was born in January 1993 in ­Minneapolis.

Years later, by the time ­Trina’s mother, Amy, had married her third husband, John Fletcher, there were concerns about Trina’s behavior, as documented by medical records furnished to the Star Tribune by her stepfather. Trinity says she has battled mental health issues much of her life but also claims that behavioral problems were exacerbated through problematic family relationships.

At 10, she was placed in St. Cloud Children’s Home, a residential mental health treatment center for youths. From there, she bounced from one foster home to the next.

Then, when Trinity was 12, Dakota County social services ordered that she be returned to her family’s home in Apple Valley, John Fletcher confirmed. The relationships with her family continued to deteriorate. Her stepfather says family members still resent Trinity for things she allegedly did between the ages of 7 and 10. Amy Fletcher declined, through her husband, to be interviewed for this story.

“I was always told, ‘It’s ­better when you’re gone,’ ” Trinity said.

One day, as a ninth-grader at Coon Rapids High School, Trinity broke down.

“I’ve never had a friend,” Trinity said recently. “I’ll look through my phone and there’s no one to talk to.”

Teacher Russ Sullivan ­connected with her immediately. So did school psychologist Brent Munce.

“Even then, she was a kid on the fence,” Sullivan recalled. “‘Where do I go? What do I do?’ She’s a resilient kid, but she needed guidance.”

“We knew she was in pain,” Munce said. “Russ and I ­worried about her.”

At 17, a year after Trinity’s mother had her daughter’s last name legally changed to Fletcher, Trinity moved out. She lived with a boyfriend, but after that relationship fell apart, she says she began sleeping in a restroom at a Cub Foods store in Coon Rapids.

She met her current boyfriend, Jesse Rolandson, 26, a roofer who never graduated from high school, and soon was living with him — in the tent they bought at a garage sale for $20. They lived in the woods in St. Francis behind a friend’s back yard, sleeping on an air mattress.

“I was scared a lot of the time,” she said. “There were coyotes outside. Branches would fall on the tent during storms. Mosquitoes went through the holes in the tent. And in the winter, my hair would freeze to the tent. Sometimes we’d sleep in Jesse’s ’92 Chevy Cavalier with the motor running, to stay warm.”

Schaaf made sure there was a school bus to pick up Trinity in St. Francis.

“Other kids at school didn’t know,” Schaaf said. “She never wore dingy clothes. She put up a front, like everything was great. You would never have guessed.”

Teachers knew. Sullivan asked other faculty members to be patient with Trinity, particularly if she looked like she might fall asleep at her desk. Munce held meetings with Trinity almost daily and vowed that she would “find a way to graduate, come hell or high water.”

Working, living in a tent and going to school — along with her emotional stress — became too much. Trinity dropped out of school at the start of her senior year, but says she soon began calling, to see if she could be readmitted. On a day when she said she’d given up hope, Schaaf called. Not only would Schaaf help her get into Transition Plus, she also recruited Trinity to help develop Hope 4 Youth, a drop-in center for homeless young people in the Anoka area.

The responsibility seemed to empower Trinity. At Hope 4 Youth, she has been mentoring Michelle Lynn Fonken, 21, a homeless mother.

Schaaf plans to help Trinity complete college-aid forms, so Trinity can pursue a career in law enforcement, in an OB-GYN office or in psychology. And she reached out to her biological father, Matt Petersen, who said he’d always wanted to see her.

On Wednesday, Matt Petersen was at the Anoka-Hennepin district office, where Trinity’s graduation was held.

“I couldn’t be more proud of her,” he said.

Her stepfather and mother did not attend the ceremony, but John Fletcher described her graduation as, “the best thing in the world.”

Trinity plans to legally change her first name from Trina to Trinity, get her driver’s license and, if possible, work at Hope 4 Youth. She and Rolandson are renting a room within a friend’s home and sleeping on an ottoman instead of an air mattress.

And now she’s armed with her diploma.

The ceremony was simple. No caps and gowns. Limited speeches. Punch and cupcakes.

“I never thought this could happen to me,” she said, showing off her diploma. “I thought I would be homeless forever.”