HARTFORD, Conn. (AP) — Jahana Hayes has won reelection for a third term, fending off a challenge from a former state senator in a Connecticut race that national Republicans had targeted and resisting a red wave that overwhelmed some of her fellow Democrats in neighboring New York.

Hayes defeated George Logan, a Republican who repeatedly linked her with President Joe Biden and House Speaker Nancy Pelosi and accused her for being tone deaf about the impact of inflation on voters. The race attracted millions of dollars in outside money, with national Republicans seeing the western Connecticut 5th Congressional District as a key opportunity to crack Democrats’ lock on the state’s congressional delegation.

“National Republicans threw everything at me but the kitchen sink, put millions of dollars in this race,” Hayes told reporters who gathered at her campaign headquarters after the Secretary of the State’s Office announced it had received election results from a remaining community that had been delayed because of a technical issue.

“I had to work twice as hard and really fight to hold this seat. And at the end of the day, I think that was the message that resonated with the people in my community, that I’m one of them and I’m going to continue to fight for them,” she said. “Listen, a win is a win. So, I’m excited. I’ll take it.”

Republicans made gains all around Hayes’ western Connecticut district, picking up at least two seats in Congress just across the state line in New York’s Hudson River Valley.

A message was left seeking comment with a spokesperson for Logan. Earlier in the day, the campaign had expressed optimism he would ultimately win the close race.

Hayes, a former National Teacher of the Year, became the first Black woman to represent Connecticut in Congress when she was elected in 2018 by the politically diverse district covering western and central parts of the state.

During the campaign, she focused heavily on abortion rights, arguing Logan couldn’t be trusted on the issue despite promising he wouldn’t support a national ban. Hayes also touted her record of passing legislation and delivering funding to the district, including money for police departments.

“People don’t have to wonder what I’ll do when I’m elected to Congress because people know what I’ve already done,” Hayes said in a debate.

The race marked the first time two Black major party candidates have run against one another for a congressional seat in Connecticut. Logan, the son of immigrants from Guatemala, a community relations director at a water company and a guitarist in a Jimi Hendrix tribute band, portrayed himself as a social moderate and fiscal conservative who would vote against GOP leadership if he felt necessary.

“I’m going to go to Washington and hit the ground running,” he said in a recent debate. “The current House Republican leadership, they know where I stand on the issues.”

Logan has hoped to become the first Republican to win the 5th Congressional District seat since it was reconfigured following the elimination of the state’s 6th Congressional District in 2003. Connecticut lost a seat following the 2000 Census. With Hayes’ win, Connecticut’s congressional delegation remains all Democrats.