No one could have predicted it when the show first started, but It's Always Sunny in Philadelphia has 14 seasons in the bag and has been renewed for another four. In all of that time, there have been more than a few classic episodes. Season 4's "The Nightman Cometh" might be the greatest episode of the entire series, though the journey to it began a season earlier when the gang tried to form a band.

When Dee started dating an aspiring rapper in Season 3, Episode 9, the rest of the gang suddenly had music on the brain. And as is often the case, they got obsessed with the idea of being a band rather quickly. Frank, Charlie and Mac joined together to form their own supergroup. Unfortunately, they all had different ideas about what kind of music they were going to play.

RELATED: Community's Background Abed Joke Actually Played a Key Role Later

But what came out of their initial practice was the beginnings of Charlie's signature musical, The Nightman Cometh. As it turned out, Charlie had an innate gift for music. The song he wrote for Mac's band, Chemical Toilet, was simply called "Nightman" and was a not-so-subtle reference to the unconfirmed sexual abuse he suffered as a child. This was something It's Always Sunny kept alluding to but never really discussed head-on.

Later in that same episode, Charlie and Dennis formed their own band after being ejected from Chemical Toilet. Together, they worked on a song that became "Dayman," the story of the person who fought Nightman. These two songs were the basis of a musical that became possibly the greatest episode of the entire series.

The grand finale of The Nightman Cometh

RELATED: Sons of Anarchy: How the FX Series Ended

In Season 4, Episode 13, Charlie emerged from the office to announce that he had finished writing a musical. Utilizing the two songs he wrote a year earlier, he orchestrated an entire play and added several more songs. His vision now complete; Charlie decided to stage a performance and asked the rest of the It's Always Sunny gang to help him out. Naturally, they made it about themselves and screwed everything up in innumerable ways.

As it turned out, the whole thing was a complicated plan to trick The Waitress into marrying Charlie. It did not work at all. But The Nightman Cometh musical served another purpose that Charlie did not intend. The gang figured out pretty quickly that everything that happened in the play was an analogy for the abuse he was subjected to in childhood. While it has never been confirmed that Uncle Jack was his abuser, it was heavily implied on multiple occasions.

The episode challenged everything people thought they knew It's Always Sunny by taking a big swing on a musical concept. But it also demonstrated how well-thought-out the series was as they deftly laid the groundwork for it a season earlier. The process also included years of building up Charlie's relationship with The Waitress and Uncle Jack. "The Nightman Cometh" was a success because of all the work the show had done developing the components needed to pull it off ahead of time.

KEEP READING: Superstore Theory: Why One Regular Character Suddenly Disappeared