Sen. Kelly Ayotte (R-N.H.) testifies during a Senate Judiciary Committee hearing on attacking America’s epidemic of heroin and prescription drug abuse on Wednesday, Jan. 27, 2016. (AP Photo/Alex Brandon)

Sen. Kelly Ayotte (R-N.H.) is eight points behind her Democratic rival, Gov. Maggie Hassan, in a race that could determine whether Republicans will retain control of the Senate, according to a poll from WMUR and the University of New Hampshire released Thursday.

The poll, which was conducted between Oct. 11 and 17, shows 38 percent of respondents would vote for Ayotte if the election were held today, compared with 46 percent for Hassan. Ayotte’s favorability rating also dropped to 39 percent, down from 47 percent in February. A Washington Post/SurveyMonkey poll taken of among likely voters of 15 battleground states from Oct. 8 to 16 showed Hassan with a 5-point lead over the incumbent.

The decline in Ayotte’s support over the last month — the race showed Ayotte with a slight lead earlier in October — is the latest sign that the unpopularity of GOP presidential nominee Donald Trump could put Republican control in Congress in serious jeopardy.

Aides for Ayotte declined to comment.

The survey was taken before the third and last presidential debate on Wednesday night in which Trump would not commit to accepting the results of the presidential election if he loses.

Ayotte withdrew her support for Trump after the release of a 2005 videotape in which Trump bragged about making unwanted sexual advances toward women. As for the election’s legitimacy, she said post-debate that “the voters are going to decide this election, and Donald Trump needs to accept the outcome.”

Trump is trailing Democratic nominee Hillary Clinton by 15 points in New Hampshire, according to a WMUR poll released Wednesday. That poll, which was conducted during the same timeframe as the Senate survey, showed voters locking in their decisions with 71 percent of voters saying they have “definitely decided” who they will choose on Election Day.

The Post/Survey showed Clinton up by 11 points in a four-way race in the Granite State.

Ayotte is one of a half dozen vulnerable GOP senators up for reelection in 2016 but her high popularity in New Hampshire has kept the race at a near tie for weeks. The Real Clear Politics average now shows Hassan with a 2-point lead.

Clinton has led Trump in the state for months with little impact on support for Ayotte. But the senator has been caught in a firestorm of controversy in recent weeks as she has struggled to respond to the release of the 2005 tape of Trump talking about kissing and grabbing women without their permission and accusations that he sexually harassed women.

In a debate held days after the tape was leaked Ayotte said Trump was “absolutely” a role model, a comment she later walked back. Later she announced that she would no longer be voting for Trump and would write in a vote for his running mate, Mike Pence.

Democrats seized on the debate gaffe with a series of ads attacking Ayotte for backing Trump. One such ad, from the Pro-Clinton group Priorities USA, accused Ayotte of “running away [from Trump] to save her political career.”

“New Hampshire voters see clearly that everything’s a political calculation with Kelly Ayotte, from her calculated move to retract her support for Donald Trump after reiterating her support for him more than 35 times to her voting record that favors the special interests who fund her campaign,” said Hassan Communications Director Aaron Jacobs in response to the latest poll.

This post has been corrected: the photo caption in a previous version read “Kelly Ayotte (D-NH)” the caption has been updated to reflect that Ayotte is a Republican. The post also was updated to reflect that 46 percent of respondents would vote for Hassan, not 48.