A surprising bit of news broke on Thursday night in the not-expected-to-be-all-that-close senate race in New Hampshire: Suddenly, it's close. But why?

Scott Brown with Sen. John McCain (R-Ariz.). (AP Photo/Jim Cole)

When we say "not expected to be close," that's a bit of an oversimplification. It's just that incumbent Sen. Jeanne Shaheen (D) has led former Massachusetts incumbent Scott Brown (R) consistently, often by double-digits. Our election predictor tool says Shaheen has a 99 percent chance of winning; the New York Times' says 91 percent; Nate Silver, 80 percent. A lot of that analysis is based solely on polling, so it may not be a big surprise, but people expected Shaheen to not have difficulty.

Then the University of New Hampshire dropped its bomb. "With less than three months to go before the 2014 election," the UNH Survey Center's Andrew Smith and Zachary Azem write, "Senator Jeanne Shaheen is in a dead heat with former Massachusetts senator Scott Brown, but maintains double digit leads over other major Republicans." To wit: What the WMUR Granite State Poll had as a 12-point lead for Shaheen in July is now a 2-point lead in August. With a margin of error of 3.4 percent, that's a dead heat.

But why? What happened over the past month to narrow the race so much? Brown has hardly run a flawless campaign. The answer is two-fold. One, this poll has more Republicans responding than past polls. And, two, Republicans have shifted slightly more to Brown.

The party composition of the survey respondents

UNH released a poll-by-poll breakdown of the respondents to its survey. The split in party identification of everyone that answered is interesting -- in the July poll, there were far more Democrats. But we're only interested in the likely voters that answered. That's for two reasons. First, the horse race question (who would you vote for) only shows responses from likely voters. And, second: These are the people who are likely to vote. (That's called a tautology.)

Here's how that has changed over the last three polls. And, to give a sense of what the New Hampshire electorate has looked like in the past, we threw in the 2012 exit polls.

In July, there was a five percentage point gap between the number of identified Democrats and the number of identified Republicans responding to the survey. In August, that flipped, and there were more Republicans. That's a swing of six percentage points -- which in itself could make up a significant part of the difference.

What the actual electorate will be in November is not entirely clear. In order for the poll to be accurate, it needs to estimate as closely as possible the make up of who comes out to vote. In 2012, that was a ton of self-identified independents. (If you're curious, Obama won the state by six points.) This year, a slight Republican advantage, as reflected in the make-up of the new UNH poll respondents, seems within the realm of possibility.

One more thing on this chart. Note that the number of independent respondents stayed essentially flat. We'll come back to that.

Brown is solidifying his base.

If you look back at UNH's April poll, you'll notice that Republicans backed Brown by about a 62-point margin. That's a big gap. But Shaheen had Democratic support at 74 points.

By August, Republicans had moved 14 points toward Brown (10 percent more for him; 4 percent less for her), while Democrats had only moved 10 points for Shaheen.

There was a tiny shift toward Shaheen among independents -- but since the pool of respondents was about the same, as we noted, that movement didn't matter much for the overall results.

Why the big move? One possibility noted by the pollster is that it is tied to Obama's flagging poll numbers. In the new survey, only 37 percent of respondents approve of the job Obama is doing. They heavily back Shaheen. But 59 percent disapprove of Obama -- and they heavily back Brown, though not as heavily.

And now we'll end with the standard, tedious truism that applies to most polling conducted well in advance of an election. What actually happens on Election Day depends on who comes out to vote. But if Republicans stay strong for Brown (partly thanks to ongoing frustration with Obama), and if they come out to vote, New Hampshire would be far closer than we might have expected.

Oh, and if Brown wins the Republican primary. But that's a different topic.