Hillary Clinton. AP

For the first time in nearly three months, former Secretary of State Hillary Clinton has taken the lead in the first-in-the-nation primary state of New Hampshire.

A new Suffolk University/Boston Globe poll of the state found Clinton with a narrow, two-point lead over insurgent Sen. Bernie Sanders (I-Vermont) in the state. Clinton grabbed the support of about 37% of likely Democratic primary voters in the state, compared to about 35% who chose Sanders.

The results are within the poll's 4.4% margin of error.

Sanders had surged in the state throughout the summer, and he has led every public poll in the state since one that was conducted from July 22 to July 30. Sanders had broken away to double-digit leads in the Granite State in two polls conducted late last month.

But Clinton's strong performance in the first Democratic presidential debate Tuesday night appears to have given her a boost.

All of the 500 likely Democratic voters included in the poll were surveyed after the debate. And, according to the poll, 54% of the survey's respondents thought Clinton "won" the debate. Sanders lagged behind, as about 24% chose him as the winner.

The poll also suggested that a key moment in the debate played to Clinton's favor in the Granite State. Clinton challenged Sanders on the topic of gun control, arguing that he has not gone far enough to promote gun-safety measures. The resulting back and forth also highlighted his support of a controversial measure that bars victims of gun violence or their family members from filing lawsuits against gun-shop owners.

"Clinton’s willingness to engage Sanders on gun control established her progressive credentials," said David Paleologos, director of the Suffolk University Political Research Center in Boston. "And her debate performance solidified her standing with New Hampshire Democratic voters, who have her leading her closest rival for the first time since July."

According to the poll, 41% of New Hampshire Democrats said Clinton's position on gun control "most closely reflects" their own position on the topic. Just 24% chose Sanders.

The poll provided an indication, however, of the extent to which Clinton's standing has fallen in the state over the past few months. The last time Suffolk surveyed the Democratic field there in June, Clinton was up by 10 points.

Granite State Democrats said in Friday's poll, however, that they believe Clinton has the best chance of winning a general-election matchup against the Republican nominee next year. A majority (52%) chose her as the Democratic candidate with the "best chance" of defeating a Republican challenger, while 16% picked Sanders and 14% favored Vice President Joe Biden.

Biden, who is still mulling whether to mount a late challenge to Clinton, was the pick of about 11% of New Hampshire Democratic voters overall. But 49% of New Hampshire Democrats said they do not believe he should run for president, compared with 36% who said he should.