Democratic Sen. Maggie Hassan defeated Don Bolduc to win a second term, fending off the Donald Trump-backed Republican whose own party establishment feared was too conservative to prevail in the swing state.

Hassan overcame President Joe Biden’s deep unpopularity in the state. Republicans went into the election cycle confident in their chances of flipping New Hampshire, but several factors foiled those expectations: A far-right candidate in Bolduc, a divided Republican Party and the reversal of Roe v. Wade helped propel Hassan.

Biden congratulated Hassan in a phone call on election night, according to a pool report.

While Bolduc tempered many of his more far-wing positions when he entered the general election, Hassan continued to highlight his more extreme positions, including on abortion and the 2020 election. Bolduc signed a letter after the 2020 election alleging that it was stolen by Biden. Hassan criticized Bolduc for claiming Trump had won the 2020 election. After the primary, Bolduc reversed his position and said the election had not been stolen.

That didn’t stop Trump from taking the opportunity to rub in Bolduc’s loss on Truth Social on election night.

„Don Bolduc was a very nice guy, but he lost tonight when he disavowed, after his big primary win, his longstanding stance on Election Fraud in the 2020 Presidential Primary,“ Trump wrote.

The retired general also struggled to fend off abortion-related attacks from Hassan. At a town hall in early October, he told supporters that the authority to regulate abortion rights “belongs” to “gentlemen” state lawmakers. Hassan’s campaign quickly cut an ad featuring the sound bite, which Bolduc said was poorly worded but not what he meant.

At the beginning of the 2022 cycle, New Hampshire was seen as one of four Democratic-held Senate seats most likely to flip. Biden’s poor approval numbers in New Hampshire made Hassan’s reelection that much harder.

But Republicans faced their own problems. Popular GOP Gov. Chris Sununu opted not to run against Hassan. Then moderate Republican Chuck Morse lost the September primary to Bolduc, and Hassan’s polling — which was hovering under 50 percent before the primary — began to climb.

Establishment Republicans opposed Bolduc in the primary, fearing the MAGA candidate would be unelectable in the general election. After he won the primary, Bolduc tempered some of his more controversial positions, but it wasn’t enough.

Weeks before Election Day, Senate GOP leader Mitch McConnell’s Senate Leadership Fund PAC pulled its money out of New Hampshire, signaling little faith in Bolduc’s ability to pull off a win. Bolduc had vowed not to vote for McConnell as Republican Senate leader.

Jordan Wolman contributed to this report.