“Sesame Street” nearly went out of business — and was forced to turn to HBO for a multimillion-dollar boost, its financial chief has revealed.

The TV favorite — which celebrates its 50th anniversary this year — left its original home at PBS in 2015 after plunging into an $11 million loss.

“It was one of the toughest decisions we ever made,” Steve Youngwood, Sesame Workshop’s COO, told The Hollywood Reporter as he admitted that the conversations with PBS were “complicated.”

“Sesame Street” is now a $100 million empire, with 5 million subscribers on its YouTube channel — and last June, bosses signed a huge deal with Apple to create new content. There are more than 150 versions of the show being produced in 70 languages, everywhere from South Africa to Bangladesh, with more countries on the way.

“Sesame Street” puppeteers have recently made trips to Jordan to help set up a new Arab-language production aimed at children displaced by the Syrian refugee crisis and that’s scheduled to launch in the region in September.

Although things have changed on “Sesame Street” over its incredible 50-year run — including the fact that viewers now have to pay HBO to watch brand new episodes — one fact remains, the fascinating feature reports: “The puppeteers still operate Muppets the old-fashioned way, with a human hand shoved up a felt hole.”

And the people who bring our favorite Muppets to life pose for a rare photo on the cover of THR. David Rudman hides under Cookie Monster, while Big Bird looks on as Peter Linz handles Ernie. Meanwhile, Ryan Dillon — who joined “Sesame Street” at just 17 — is under perennial favorite Elmo and Leslie Carrara-Rudolph appears with Abby at the show’s Queens studios.

“We have a few rules here,” Carmen Osbahr, who normally operates Rosita, “Sesame Street”’s Latina Muppet, told the magazine: “Always deodorant, never onions.”

The show — which hired a young and exceedingly talented puppeteer called Jim Henson — was the brainchild of Joan Ganz Cooney and Lloyd Morrisett, who hatched the idea at a Manhattan dinner party. It now reaches 150 million across the globe. Meanwhile, Bert, Ernie and the gang have won 189 Emmys, more than any other TV program.

To celebrate its anniversary, there will be a TV special, a “Sesame Street” 10-city road trip, and the series will have a Manhattan street named after it. Meanwhile, Anne Hathaway is set this summer to shoot a “Sesame Street” movie, directed by Jonathan Krisel.

A host of A-listers, from Robert De Niro to Carol Burnett, have appeared on the show. As Ryan Reynolds (who stuck his head through a giant letter A) told THR: “Honestly, ask any actor if they want to stick their face into an A-hole and sing … chances are pretty good they’ll say yes.”