Jeanne Shaheen
U.S. Sen. Jeanne Shaheen, D-N.H., speaks at a campaign stop to receive the endorsement of the NARAL Pro-Choice New Hampshire PAC in Manchester, Sept. 29, 2014. Reuters

Democratic Sen. Jeanne Shaheen won re-election to her New Hampshire seat Tuesday, fending off Republican challenger Scott Brown. Brown, a former senator from Massachusetts, was making his second attempt in as many states to get elected to the Senate. He was elected in January 2010 in a special election after Sen. Edward Kennedy died in August 2009, but was defeated by Elizabeth Warren in 2012.

With so much at stake, voter turnout across New Hampshire was anticipated to be "the highest number of votes in a midterm election," Secretary of State Bill Gardner told the Associated Press Tuesday. While Shaheen’s victory provides Democrats with a much-needed seat, it might not be enough for the party to hold on to the upper chamber.

Shaheen beat incumbent Republican Sen. John Sununu with 51.62 percent of the vote in 2008, ending 30 years of GOP control of the New Hampshire seat. Most wrote Brown’s campaign off from the start, assuming he would be unable to overcome the stigma of moving states to win a Senate seat. But anti-Washington sentiments in voters began to bubble to the surface and polls in the closing weeks showed a tight race.

The New Hampshire race came down to two points. Brown, who served 35 years in the Army National Guard, spent much of the campaign tying Shaheen to President Barack Obama and criticizing her for supporting the White House’s initiatives, including the Affordable Care Act. Shaheen harped on the fact that Brown had only lived in the state for a few months.

The two candidates sparred over border security, with Brown criticizing Shaheen for not working to make the southern border secure. In response, Shaheen attacked Brown for not attending border hearings while he was a Massachussetts senator from 2010 to 2013.

Both candidates benefited from a large influx of support from their parties. Outside groups also played an outsized role in the election, spending millions of dollars trying to influence voters both ways. In the last week of the campaign an anti-government spending group poured $1.25 million in the race to oppose Shaheen. And environmental groups pumped millions into the state opposing Brown.

Former Secretary of State Hillary Clinton stumped on Sunday for Shaheen. And Warren, who defeated Brown only two years earlier, also traveled to New Hampshire to campaign for the incumbent.