It was about a minute into Jahana Hayes’s victory speech, which, to that point, consisted of two words — “Wow,” she said twice, gathering her composure — when she recalled the launch of her unlikely campaign for Congress just 102 days earlier, “with no money, no network, no people.”
“People told me I had no chance and I had no business trying to do this,” she said on Tuesday. “We proved them wrong.”
Ms. Hayes, 45, is the newly minted Democratic nominee from Connecticut’s Fifth Congressional District, defeating a more seasoned opponent, Mary Glassman, who had the party’s backing. If she defeats the Republican candidate, Manny Santos, a former mayor of Meriden, in November’s general election, she will become the state’s first black Democrat to serve in Congress.
Her acceptance speech was, in many ways, a metaphor for Ms. Hayes’s life, one that began with diminished expectations: a childhood of poverty in Waterbury, where she lived in public housing and was briefly homeless before becoming pregnant at 17. She then embarked on a career in teaching that led to a National Teacher of the Year award.
Her primary victory also marked a watershed moment for the teachers’ movement, in which educators are demanding better pay and labor protections in protests and strikes across the United States, from West Virginia to Arizona.
And although Ms. Hayes’s story likely has many origin points, her nascent political career probably began on a different stage from the one in Waterbury that she occupied on Tuesday night.
In 2016, Ms. Hayes, a history teacher in Waterbury, was chosen as the National Teacher of the Year, and traveled to Washington to accept the award from President Barack Obama.
As the president was about to speak, Ms. Hayes, visibly overjoyed, continued her clapping. “You just need to settle down,” Mr. Obama quipped.
“This is what makes her a great teacher,” the president continued. “You can’t be great if you’re not enthusiastic.”
Ms. Hayes used a snippet from that moment in her campaign video, which went viral, much like the video that helped Alexandria Ocasio-Cortez defeat Representative Joseph Crowley, the Democratic incumbent in Queens. Within four days, it had five million views and tens of thousands of shares on Facebook.
But her victory and sudden prominence may also expose Ms. Hayes to some of the same sort of backlash that Ms. Ocasio-Cortez has seen since her primary victory, as Republicans and conservative commentators have seized on any evidence of her inexperience or unfamiliarity with world issues or even the mechanics of Congress.
In an interview on Wednesday, Ms. Hayes acknowledged the parallels between her race and Ms. Ocasio-Cortez’s.
But, Ms. Hayes said, unlike Ms. Ocasio-Cortez, who is a democratic socialist, she characterizes herself as a die-hard Democrat who represents a very different district in Connecticut than Ms. Ocasio-Cortez’s district in Queens and the Bronx. Ms. Hayes’s district contrasts sumptuous weekend properties in the hills of Litchfield County with struggling cities like Waterbury, where a quarter of residents live below the poverty line.
“A representative of this district would have to be progressive on some issues and a little more moderate on others,” said Ms. Hayes, who is raising four children with her husband of 10 years.
Her opponent, Mr. Santos, won a three-way primary race, and has his own compelling back story as an immigrant and military veteran. He emigrated as a child from Portugal, where his home had no running water or electricity. His family settled in the Hartford area and he eventually became an engineer. In the early 1990s, he served in the Middle East during Operation Desert Storm, as a fighter jet mechanic and rifleman.
But Mr. Santos faces a tough general election. Organizations like the Cook Political Report, which rank congressional districts, note that Connecticut’s Fifth District is solidly Democratic.
Ms. Hayes certainly reflects that political demographic, advocating for progressive doctrines like Medicare for all and gun control, ideals that are anathema to the current White House. In her victory speech, she pulled no punches, castigating the recent separation of immigrant families at the Mexican border and referred to “putting babies in cages.”
Still, she has not dwelled on either President Trump’s rhetoric or his policies.
“I could probably count on one hand the number of times I mentioned him by name in this campaign,” she said on Wednesday. “I think the concerns that people have about this administration are self-evident and I don’t need to double down on that. We have to work to come up with solutions.”
On her campaign website, Ms. Hayes credits the support of the Waterbury community in helping her overcome a childhood marred by drug abuse — her mother was an addict — and instability. At one point, her family lost their apartment and she moved in with her grandmother.
“My mom struggled with addiction, my grandmother raised me, I was a teenage mom — all these things that traditionally would have caused people to disengage from their communities,” she told The New York Times in an earlier interview. “I can say my community stood up and helped me rise out of that.”
She put herself through school while working nights and raising her child. After enrolling in community college, she earned a four-year degree from Southern Connecticut State University and then earned master’s and advanced degrees from two other universities in the state.
Along the way, she married Milford Hayes, a police detective. They live in Wolcott, a suburban town settled in the 1730s with ample open space outside of Waterbury.
After receiving the teaching award in 2016, Ms. Hayes put away her lesson plans at John F. Kennedy High School and moved to the school district’s central office, where she mentors new teachers.
Robert A. Johnston, the high school principal in Waterbury, said he was not surprised by news of Ms. Hayes’s election success. He said she had a preternatural ability to connect with students. “She understood young people,” he said. “She knew what made them tick.”
Astead W. Herndon contributed from New York, and Arielle Dollinger from Connecticut.
Follow Lisa W. Foderaro on Twitter: @lisanyt