President Barack Obama and Republican presidential nominee Mitt Romney took a lot of flak during the election campaign from each other and outside groups, but a close third behind them in the heat-absorption department: pollsters.

Enduring waves of criticism, especially from conservatives, the majority of pollsters working nationwide got it right, including in Pennsylvania.

"The point is that the independent polls were within the margins of error and within (the margins of error) of each other," said G. Terry Madonna, Ph.D., who directs the poll run at Franklin & Marshall College and co-sponsored by Times Shamrock Newspapers.

Translation: His poll and the others were right, though maybe he is too modest to flatly say it.

No pollster in Pennsylvania took more criticism than Madonna.

In late March, F&M issued a poll showing Republican former U.S. Sen. Rick Santorum leading by only 2 percentage points in the Republican presidential primary race in Pennsylvania. Santorum none-too-politely questioned Madonna's result during an April 1 Fox News Channel interview.

"First off, the Democratic hack that does that, Terry Madonna, has probably singularly gotten more polls wrong than any person I know in the history of the state," Santorum said. "There are two other polls that are out this week that have us up 20, and I think the other is 17. This is a pollster who just - I think he just draws numbers out of a hat sometimes. We feel very good about Pennsylvania. We're going to do exceptionally well there."

Never mind that Madonna's last poll before Santorum's enormous 2006 election loss to Democrat Bob Casey nailed the final result in that race almost exactly. The poll had Casey up 17 percentage points. Casey won by 17.4 points.

Nine days after calling Madonna a "Democratic hack," Santorum, bowing to reality and the possibility of losing his home state, dropped out of the primary race.

Only a week ago, Dale Murray, a borough councilman in Mount Joy in Lancaster County, reminded everyone Madonna was a Democratic county commissioner there in the 1970s and accused him of oversampling Democrats.

To Madonna's argument that Romney would have "a huge climb" to win Pennsylvania, Murray pointed to more favorable poll results for the Republican presidential candidate found by a Republican-leaning pollster.

"Looks like our local, unbiased expert was very wrong," Murray wrote in the Lancaster Sunday News.

Turns out, Madonna wasn't wrong.

The last F&M poll before the election, conducted between Oct. 23 and 28, showed Obama ahead 49 percent to 45 percent among likely voters, a four-point edge. The final result: Obama won 52 percent to 46.8 percent, a 5.2-point edge.

The poll had Casey ahead of Republican challenger Tom Smith by a 48 percent to 39 percent margin, or 9 points. Casey won 53.7 percent to 44.6 percent, or 9.1 points.

Factoring in the poll's margin of error of plus or 4.2 percentage points means the F&M poll got it right in both cases.

Five other polls had the presidential race at 3 to 6 points, all within their margins of error and close to the final result. Three other polls had the Senate race at 6, 7 or 8 points, also close to the result.

The only polls that missed: Susquehanna Polling and Research and Rasmussen Reports, both Republican-leaning pollsters.

Rasmussen's last presidential poll had Obama up 5 points, which is on the mark, but Susquehanna's last poll had it tied a week before the election and both pollsters were off in the Senate race, with both having Casey up 1 point.

Efforts to reach Susquehanna president James Lee were unsuccessful, but the day after the election he told the Pittsburgh Tribune-Review, for whom he conducted two polls, that he had underestimated the turnout by Democratic and younger voters.

"That caught me off-guard. I didn't think that was going to happen. I didn't think the enthusiasm was there," Lee said of the Democratic voters.

Of the younger voters, he said, "I was suggesting it would be lower with that age group, given unemployment was considerably higher" for them, the newspaper quoted Lee as saying.

Lee denied his firm's Republican leanings contributed to the error.

"Are we a Republican polling firm? Yeah. I'm not pretending that we aren't. But when (the results) benefit Democrats, we say it," Lee told the newspapers.

In 2010, Susquehanna's last pre-election poll had former Rep. Pat Toomey leading by 2 points in the U.S. Senate race when other polls had him further ahead. Toomey defeated Democrat Joe Sestak by 2 points.

Madonna, who has polled Pennsylvania voters since 1991, said he always takes heat for his polling.

"I would get criticism often from candidates and parties, but this year the difference was it was personal," he said.

Besides Santorum and Murray, Madonna received criticism in numerous emails and from bloggers.

"Beginning in the 80s, for now 32 years, I've not been a partisan, you know what I mean? How long must I be away from it?" he said. "But this year, it got personal. The charges were that we were deliberately building in bias to help one party and one candidate. That's what's new, not that we didn't do something right."

Questioning his methodology is fair, he said. Questioning his motivation is not.

"We've been talking about it for weeks," said Chris Borick, Ph.D., director of the poll at Muhlenberg College of the criticism pollsters faced. "He got it worse than I did."

Muhlenberg, which had the presidential race at 3 points and the Senate race at 6 points - both within the margin of error - endured criticism when it issued the first independent poll showing Smith gaining on Casey.

Partisan criticism of independent polls "is all for stagecraft," Borick said.

"The last thing you want to do is have your base (voters) think, 'OK, what's the purpose of this one, why are we even trying here?'" he said. "All you can do is say, 'Here's our methods, here's the way we constructed (the poll).' The irony, at least in our case, is we ended up oversampling Republicans. If anything, I think, in the end the Dems had the better case (for error) to make."