To all the millions of victims of superstorm Sandy, Chris Matthews has a message: "I'm so glad."

The MSNBC host, on a panel of pro-Obama pundits including Rachel Maddow, ended election coverage overnight by saying he's "glad" the storm hit, suggesting it served a greater good by boosting President Obama to a second term.

"I'm so glad we had that storm last week," Matthews said, after interjecting to give some final thoughts. Somebody off-screen could be heard saying "ooo" at that remark, but Matthews confidently put his hand up to explain.

"No, politically I should say -- not in terms of hurting people. The storm brought in possibilities for good politics," he said.

Click to see the video.

Matthews apologized on air at the beginning of his show Wednesday night.

"It was a terrible thing to say, period," Matthews said. "I could say it was because I was tired, but the fact is, I wasn't thinking of the horrible mess this storm has made of people's real lives up here in New York and elsewhere."

Earlier Wednesday, via social media, he had attempted to explain his remarks.

"To clarify -- I was thrilled at the cooperation between the President and state officials that made the country proud. Great bipartisanship," he tweeted.

"Obviously I wasn't talking about the horror of the storm. I grew up on the Jersey shore," Matthews wrote in another message on his Twitter feed.

The death toll from that storm, which caused billions of dollars in damage, now exceeds 100. Many in the path of the storm's wrath -- in New Jersey, New York and elsewhere -- lost their homes or their cars or were otherwise displaced. The storm wreaked havoc on Election Day, as officials scrambled to facilitate the vote with many precincts facing power outages and fuel shortages.

Some analysts did say the storm boosted Obama's image by allowing him to show a bipartisan side -- reaching out to Republican Gov. Chris Christie, who publicly thanked Obama for the federal government's support -- and effectively sidelining Mitt Romney for a few days one week before the election.

Exit polls also showed about four in 10 voters said Obama's response to Sandy was important to their vote, and they backed the president by more than a 2-to-1 margin.

Matthews, though, was oddly upbeat in describing the political impact. He made the Sandy comment after ripping Republicans for their "assault" on the president.

"I am so proud of the country. To re-elect this president and overcoming -- not because of the partisanship or even the policies -- just the fact, here's an African guy, African-American guy with an unusual background -- part immigrant background, part African-American background -- with all this assault on him from day one. From Mitch McConnell, from the clowns out there that aren't elected, never will be to anything," he said. "And the way he took it, as someone said, with coolness and charm and dignity and just took it and took it and kept moving forward and doing his job. ... A good day for America."