With the landmark comedy opening the TCM Festival on Thursday, Brooks reminisces about Gene Wilder, Zero Mostel, and attacking fascism with humor.

Without “The Producers,” there might never have been “Blazing Saddles,” “Young Frankenstein,” and “Spaceballs.” And yet Mel Brooks’ movie debut (which earned him the Oscar for Best Original Screenplay) was the most original work of his career, combining subversive humor with a tender bromance between Zero Mostel’s Max Bialystock and Gene Wilder’s Leo Bloom. This was no genre bender, but it was a cultural assault on fascism and conformity, and it was ahead of its time in elevating the LGBT artistic community.

In honor of its 50th anniversary, “The Producers” opens the ninth TCM Classic Film Festival Thursday night at the Chinese Theater IMAX in Hollywood, with a digital 4k restoration courtesy by Studiocanal. For the 91-year-old Brooks, the cult favorite-turned comedy classic was a miracle that launched his celebrated film career as writer-director.

“It was very simple: You can make more money with a flop than with a hit,” Brooks said about his wild premise for making fun of Adolph Hitler. Down-and-out producer Bialystock and accountant Bloom use creative accounting to mount “Springtime for Hitler” (the film’s original title until Embassy Pictures head Joseph E. Levine nixed it), which becomes the toast of Broadway, despite its bad taste, and lands them in prison. Brooks shared these highlights from the project in a wide-ranging interview with IndieWire.

Finding Wilder

“I found Gene Wilder, who was in a Bertolt Brecht play, ‘Mother Courage and Her Children,’ with Anne Brancroft [in 1963], who I was dating,” said Brooks. (They married a year later.) “He was a funny-looking guy and the three of us met for a cup of coffee after one of the shows. He was frustrated because they were laughing and he didn’t know why. I told him to look at himself in the mirror. He was touching and funny and I found my eloquent, beautiful, [timid] accountant, Leo Bloom.”

And Brooks always had Mostel (the Broadway star of “Fiddler on the Roof”) in mind to play the overbearing Bialystock. The first time he saw him perform at New York’s Village Vanguard, the comedian got on the floor and impersonated a coffee percolator. For Brooks, his co-stars represented the two sides of his own legendary personality.

“As writers, we can only use ourselves,” he said, before explaining how he came to direct such a memorable ensemble cast that included Kenneth Mars (as playwright Franz Liebkind), Dick Shawn (as hippie L.S.D., who plays Hitler), and Christopher Hewett (as cross-dressing director Roger De Bris).

“When Joe Levine said we needed a director, I said I can be the director,” added Brooks. “I’m the writer, I see it, I see every scene, I see a half-moon coming out of the office window, I see little old ladies and what they look like on the couch being thrilled, being loved by Bialystock. I see ‘Springtime for Hitler,’ I see the burlesque show, the beer, and the pretzels. You can’t go wrong with me.”

Trial by Fire

Although Brooks got the directing gig, it was a far cry from stage managing Sid Caesar’s “Your Show of Shows” on TV. It was a scary trial by fire. In fact, Brooks was so nervous that on the first day of shooting, he yelled cut instead of action. “Funny thing,” Brooks recalled. “Joe Levine, after seeing one week of dailies, said, ‘I’ll give you another $50,000 to find an actor who’s better looking [than Gene Wilder].’ He didn’t get it. He said, ‘There’s only one problem with the picture: Nobody’s good looking.’ That was part of the politically incorrect tact.”

But the worst day of shooting somehow turned out to be the best: “It was five ‘o clock and I said to Gene, ‘We’re gonna do the blue blanket [hysterical] scene.’ And he said, ‘But I’m not ready now. I need time. I’m tired. It’s the end of the day. I’ve got to have energy and I don’t have it.’ ‘Well, what gives you energy?’ ‘Chocolate.’ So I ran out and I bought Hershey bars and made him eat two.

“And Zero said his leg hurts, he can’t do this. He was hit by a bus before we started shooting. So I was having a nervous breakdown. And then we started rolling and I started crying because it was a miracle. It was so beautiful. Zero looked right into the camera and said, ‘This guy should be in a straightjacket.’ He broke the fourth wall and it was like God was on my side.'”

Another weird turn of events occurred when Dustin Hoffman had to turn down the role of the fanatical Hitler supporter, Liebkind, when he left to audition for “The Graduate,” co-starring Bancroft. “I thought this was all too bizarre,” Brooks said. “Go, you’re a mutt. The minute they see you on film, they’ll say we got the wrong guy. He called me back two days later and said they want me.

“He would’ve been brilliant, but I think I got lucky with Kenny Mars. He was a little nuts and he became Franz Liebkind. It was some transformation. He was so angry when Dick Shawn said, ‘Hey, baby.'” And nobody cut Churchill down to size better than Mars Liebkind: “Hitler was better looking than Churchill. He was a better dresser than Churchill. He had more hair! He told funnier jokes! And he could dance the pants off of Churchill!”

From Cult Classic to Broadway Hit

After bowing disastrously in Pittsburgh in November, 1967, Embassy considered shelving “The Producers.” But Peter Sellers came to the rescue after attending a private screening and taking out an ad in Variety.

This undoubtedly helped Brooks win the Oscar in 1968 (beating “The Battle of Algiers, “Faces,” and “2001: A Space Odyssey”). “I didn’t think I’d win the Academy Award,” he said. “When Frank Sinatra called my name, I yelled from the audience, ‘Take another look at the paper!’ He looked at me like I was crazy and I didn’t prepare a speech.”

But Brooks came bizarrely full circle when “The Producers” became a Broadway hit and then a movie musical with Nathan Lane and Matthew Broderick. “When we did the show on Broadway, during one of the last previews at the St. James there was a big guy who said this was an outrage,” Brooks said, recalling that the man told him, “How dare you. I was in World War II.” Brooks replied, “So was I. I didn’t see you there.”

It still holds true: If you can make people laugh at Hitler or tyrants in general, “then you’ve won the day,” he added.

Meanwhile, Fathom Events (along with TCM) will present “The Producers” in theaters across the country on June 3 and 6.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.