Warning, spoilers ahead.

The bad news had nothing to do with fertility. (CBS photo)

Well, that was quite a stomach-punch to start the new year. Last night, “How I Met Your Mother” capped a fairly funny episode with the stunning death of Marshall’s dad. Whoa, not so funny now. But man, Jason Segel pulled out his acting chops there. His tearful “I’m not ready for this” was heartbreaking.

The twist took me by surprise, but looking back, the signs were there: The episode was titled “Bad News,” and throughout the show, a series of numbers in the background (that I noticed but didn’t put together) provided a sort of countdown to the end. We just didn’t know what was being counted down.

I’m curious to hear what fans of the show thought. I’m seeing a lot of Internet chatter from fans who are angry, saying the death felt out of place in what’s supposed to be a light comedy. But I think that’s why it was such a great ending. I have no problem with a comedy adding a dramatic punch every once in a while, as long as it’s done well.

It’s not like “HIMYM” is the first to try it — remember the Brendan Fraser episode of “Scrubs”? (Probably my single favorite episode of that series.) On “Cheers,”  Coach died, and Sam fell off the wagon. “WKRP in Cincinnati” had the deadly concert stampede. If anything, those types of episodes keep a show grounded in reality, and demonstrate the value of comedy as a healing property in life.

“HIMYM” hasn’t shied away from serious topics before, but they’ve been about relationships and breakups. And if you look at the overall theme of the series, a parent’s death doesn’t come out of nowhere. That group of friends are in their early 30s, entering adulthood, starting careers, relationships and families. And that’s also the time when many people lose a parent. Dealing with mortality is a part of growing up, and for Marshall — who can handle getting married, becoming a lawyer and is ready to have kids — it’s the one thing he’s not ready for. I think that’s something a lot of us can relate to, and maybe that’s why the ending felt so raw.

So what’d you think? Cheap shot or powerful emotional twist?

Follow me on Twitter at twitter.com/thatwarmglow.