A Charlie Brown Christmas is the second longest-running holiday special in TV history, second only to 1964's Rudolph, the Red-Nosed Reindeer. But before it hit the small screen 50 years ago, all anyone could say was, "Good grief."

Midway through production in 1965, executive producer Lee Mendelson remembers a visit from an ad executive at McCann-Erickson, whose client Coca-Cola commissioned the special. Looking at rough pencil drawings and animation tests with no music, "he said: 'This isn't very good. I don't know what I'm going to tell the agency. If I tell them what I think, they're going to cancel the show,' " Mendelson says. "I said, 'Well, wait, whoa, this is all very rudimentary. If you believe in Charles Schulz and his characters, you're just going to have to trust us that this is going to be great.'"

Christmas was born at Schulz's home in Sebastopol, Calif., where he, Mendelson and director Bill Melendez mapped out the 25-minute feature in just a couple of hours. "The ideas flew out of our heads in a surreal way," Mendelson says. "(Schulz) said the basis of this should be the pressure that we put on our kids at Christmastime when they're in Christmas plays." Inspired in part by Hans Christian Andersen's The Fir Tree, they incorporated a limp, paltry Christmas tree into the story "that would be somewhat like Charlie Brown and no one really liked."

Linus' recitation of the birth of Jesus from the Gospel of Luke was Schulz's idea. "He said, 'If we're going to do a Christmas special, we've really got to do it the right way and talk about what Christmas is all about,' " Mendelson says. "Bill and I looked at each other, and I said, 'There's never been any animation that I know of from the Bible. It's kind of risky.' Then Mr. Schulz said, 'Well, if we don't do it, who will?' "

After submitting the show's outline to McCann-Erickson early that next week, they were given little more than five months to create the special with a group of animators, child voice actors and composer Vince Guaraldi. The opening song, Christmas Time is Here, was co-written by Mendelson and recorded with a children's choir just four days before the show premiered, while the infectious Linus and Lucy theme was written two years earlier, only three days after Mendelson first met Guaraldi in 1963.

"He called and said, 'I gotta play something for you over the phone,' and he played Linus and Lucy for the first time," Mendelson says. "It just knocked me out. I remember saying, 'That song is going to affect all our lives,' and I had no reason to say that." Without Guaraldi, who died in 1976, "we never would've had the success we had. The music became fundamental." The Vince Guaraldi Trio's Christmas soundtrack has since sold more than 3.4 million copies, according to Nielsen Music, and was inducted into the Library of Congress in 2012.

But as the special's December premiere inched closer, even Mendelson and Melendez started losing faith in the winsome Peanuts classic (the first of more than 40 TV specials starring Schulz's comic-strip bunch).

"We thought that it was maybe just too slow and we had failed poor Charlie Brown," Mendelson says. "I remember one of the animators, Ed Levitt, stood up in the back and said, 'You guys are crazy, this is going to run a hundred years.' And, of course, we thought he was crazy."

CBS was similarly disapproving when producers brought the finished product to the network, although it had no qualms about the special's religious themes.

"It never got that far, because they thought that having jazz music on a Christmas show didn't make much sense," Mendelson says. "They didn't like the (voice) actors being kids, and they just didn't like the show in general. They said: 'You made a nice try. We'll put it on the air, obviously, but it just doesn't work.' "

Lo and behold, Christmas was a ratings smash when it premiered Dec. 9, 1965, on CBS. Watched by about half the country that night, the special has replayed annually ever since and continues to pull in strong ratings (averaging more than 6 million viewers when it aired last year).

The show's influence and success didn't sink in immediately, at least not for Schulz. According to his widow, Jean Schulz, the late Peanuts creator (nicknamed "Sparky") was proud he stuck to his guns despite the network's reluctance, although he didn't admit it outright.

"He was continually working ahead and not looking back," Schulz says. "They say when an author's written a book, he really doesn't want to talk about it because he's on to the next one, and that was really the way Sparky was. It wasn't until 10, 15, 20 years later that it looked like a classic. That's when he really felt the pride in having been a part of the creation of it."