Polls showed Gov. Scott Walker and Democratic challenger Mary Burke even for months, but on Tuesday the Republican won by a virtually identical margin as he did in 2010.

So how did he win with a comfortable margin when the race seemed so close for so long?

The answer includes multiple factors: Democrats who otherwise vote in presidential elections stayed home. Walker performed well in northern and western Wisconsin. Polls may have skewed toward Democrats. Late-breaking campaign developments may have boosted Walker’s chances.

“If you look at this election compared to Walker’s first win in 2010 and 2012, it’s like Groundhog Day,” said David Wegge, director of the St. Norbert College poll. “In order for (Burke) to have won, she needed to drive (her percentage in Milwaukee) up into the high 60s and hold down Walker’s vote in northeast Wisconsin, which she wasn’t able to do.”

Wegge said part of the explanation for the break toward Walker is there are no undecided voters in the final election results. Nationally, before 2006, undecided voters tended to vote for challengers, but since then they have broken more toward incumbents, he said, and the same pattern may be in effect in Wisconsin.

Exit polling also showed independents backing Walker by a 53-43 margin, Wegge said. Only 7 percent of Democrats voted for Walker and only 4 percent of Republicans voted for Burke.

Midterm turnout also proved to be the Democrats’ Achilles’ heel yet again in Tuesday’s election, which saw Republicans win sweeping Congressional and gubernatorial victories across the country.

Walker’s 5.7-point victory margin was nearly identical to his 2010 win over Milwaukee Mayor Tom Barrett. Both Walker and Burke lost votes compared to the tallies in the 2012 recall, which Walker won by 6.8 points. Burke lost by 33,700 fewer votes than Barrett, allowing her to close the gap by a point.

Compared to the 2012 presidential election, Burke received 618,000 fewer votes than President Barack Obama while Walker received 234,000 fewer votes than 2012 Republican presidential nominee Mitt Romney.

Those drop-offs align with a trend in gubernatorial elections since 1984 when a Democrat is in the White House.

Republican pollster Gene Ulm said that given the polarization of the state, turnout patterns may have played a bigger role than efforts by the candidates to persuade undecided voters.

“There’s a chunk of base Democratic voters that simply didn’t show up,” Ulm said.

Democratic strategist Paul Maslin said another explanation for Walker’s big win was his continued success in courting voters outside Dane, Rock, Milwaukee and the five other counties that make up southeastern Wisconsin. Obama won the 64 counties in the rest of the state 50-49, while Walker won them 57-43.

Among recent polls, only the Marquette Law School Poll (which had Walker up 50-43 a week before the election) came close to predicting Walker’s winning margin.

The discrepancy between polling and unofficial election night results was not unique to Wisconsin as polling across the country appeared to slant toward Democrats by several points, UW-Madison political science professor Barry Burden said, citing an analysis by statistical analyst Nate Silver.

Burden also noted that Madison and Milwaukee voters did not turn out in droves to give Burke the boost she needed to win.

In Dane County, Burke received almost the same number of votes that Milwaukee Mayor Tom Barrett received in 2012 (Walker’s total dropped by about 4,000 in Dane).

In Milwaukee County, Burke received almost 20,000 fewer votes than Barrett (Walker’s total dipped by nearly 11,000 votes).

“Republicans are better at holding onto their voters and keeping them active in a midterm election,” Burden said. “Maybe that was at play because there was a recall.”

Burden said if there were many undecided voters until recent weeks, it’s unclear why voters began breaking for Walker.

Possible reasons include continued fallout from the revelations that Burke copied parts of her jobs plan from other candidates and allegations that she was forced out of her family company before being rehired, although Burke vigorously disputed that, he said.

Visits from President Barack Obama and other national Democrats may have had little effect, and positive monthly jobs numbers may have buoyed Walker, he said.

“It’s probably a combination of all those things,” Burden said.