The path Duniya Syed has charted for herself didn’t seem possible just a few years ago.

The standout New Roads School alumna is heading to Hobart and William Smith Colleges in Geneva, New York, where she plans to study math and science. She has a full scholarship from the Posse Foundation, a track record of academic success and a passion for speaking out against injustices.

And to think, just three years ago, she was escaping an arranged marriage in Afghanistan.

“I just knew I had to leave that country,” she said. “If I would have stayed, I would have had to marry the guy who my father wanted me to marry — or go to prison.”

On Aug. 16 she’ll travel to her local host family’s vacation home in Canada, and a few days later she’ll drive to Geneva. School starts later this month.

It’s the next chapter of a journey that Syed recounts with remarkable poise.

Her parents separated when she was 8 months old, which led Syed, her siblings and her mother to move in with Syed’s grandparents. She lived with them in Kabul for her whole childhood and had no contact with her birth father, who remarried.

But when Syed was 15, her father arrived from Mazar-e-Sharif and demanded that she marry his middle-aged friend. Her father had sold her.

Syed grew up in a country where gender equality is not the norm, where girls face severe consequences for not obeying their fathers. Luckily for her, she said, her grandfather had a different approach than most men.

“He always taught us that, no matter what, we had the same rights,” she said. “He never treated me and my brother differently. No matter what, he told me that education comes first and that I didn’t have to marry someone I didn’t want to.”

In a span of three weeks in 2013, Syed’s life changed dramatically. She went into hiding with an aunt as her family frantically contacted people who might be able to help her leave Afghanistan, getting in touch with another aunt in Washington D.C. That aunt emailed Sara Nichols, a local woman she knew through the nonprofit Feminist Majority Foundation, asking if Nichols could take in a girl from Afghanistan who was trying to escape an arranged marriage.

“She is an extraordinary young woman,” said Nichols, who had visited Afghanistan in late 2009. “When I learned that the only way Duniya could come to the U.S. expeditiously was on a student visa for a private school, I immediately thought of New Roads School and its founder, Paul Cummins. I had met Paul on several occasions and I knew what an open-hearted man and inspirational educator he was.”

Cummins helped Nichols get the attention of officials at the Santa Monica private school, who offered Syed a full scholarship. Soon enough, Syed was alone on a plane to Los Angeles, where Nichols and her husband were waiting to pick her up.

“When they announced that we were landing, I was like, ‘Oh my God, what did I do?’” Syed recalled. “I don’t even know the family. I haven’t seen them or anything. In that moment, I realized I was going to be living with people I’ve never met. I was wondering what kind of people they would be, if I’d ever feel comfortable, if it would ever feel like home.

“This all happened in a rush. There was no time to think about where I was going to stay.”

Living in the U.S. was a major adjustment for Syed, who had never attended a coed school. She had never even seen girls wearing shorts. But she thrived for three years both academically and beyond the classroom, getting involved with Human Rights Watch and the Anti-Defamation League.

“My experience was wonderful,” she said. “My teachers really cared about what we had to say. We were never cut off. We were encouraged to speak out and think for ourselves. That’s not something that’s encouraged in Afghanistan.”

Syed, who earned permanent residency status before applying to colleges, chose Hobart and William Smith in part because she believes its small class sizes will afford her meaningful interactions with professors.

She said she’s comfortable sharing her story, hoping that it will inspire others to seek out new opportunities, as scary as they might seem initially.

“You never know what happens,” she said. “Things can turn around really fast. No matter what, you can still do the best you can to get what you want. You have to be very strong. You have to believe in yourself and try your best. It’s really you who can change what happens. You can’t be afraid of the unknown. You never know — it can be the best thing for you.”