He was young. He was eager for approval in a tough business. And he was a little lonely. So, for more than a decade, Steve Rannazzisi — lately of FXX show “The League” and a Comedy Central special — told a huge lie: He said he was in one of the Twin Towers on Sept. 11.

“I was sort of the party starter of Merrill Lynch,” he said in an interview in 2009. “Until our building got hit with a plane. … And then the party ended right there.”

Rannazzisi said he was still haunted by the attack in his sleep.

“I still have dreams of like, you know those falling dreams,” Rannazzisi said in 2009.

But last month, faced with a damning New York Times story revealing his deception, Rannazzisi was forced to atone on Twitter.

“As a young man, I made a mistake that I deeply regret and for which apologies may still not be enough,” he wrote. “After I moved with my wife to Los Angeles from New York City in 2001 shortly after 9/11, I told people that I was in one of the World Trade Center towers on 9/11. It wasn’t true. I was in Manhattan but working in a building in midtown and I was not at the Trade Center on that day.” He added: ““I don’t know why I said this. This was inexcusable. I am truly, truly sorry.”

Now, in an excruciating interview on “The Howard Stern Show” on Tuesday, Rannazzisi has apologized in person — to one of the most sarcastic, flip, bawdy hosts in the history of radio. Lucky for Rannazzisi, who’s appeared on the show before, Stern was in Oprah Winfrey mode.

“I thank you for coming in, because I know it ain’t easy,” Stern said. “I’m sure you’re nervous.”

Rannazzisi did indeed look tense — and very unfunny. He even appeared to choke up a few times in the grueling 40-minute interrogation that followed.

“Do you ever say to yourself — why?” Stern asked.

“I’m becoming more aware,” Rannazzisi said.

Stern speculated that Rannazzisi, 38, may have told his tall tale to get attention.

“When I moved to Los Angeles it was about a month after 9/11,” Rannazzisi said. “I moved with my girlfriend. She got a job right away. … She got a job as a nanny, started making friends, making money.”

Rannazzisi, however, said he struggled.

“I was hanging out in comedy clubs,” he said. “Trying to just … not even make it. Just fit in. Survive. Make some friends. And just trying to start living a life.”

Stern asked whether Rannazzisi thought of himself as a liar. “Do you think of yourself as psychologically disturbed?” he asked.

“I’m not sure if that’s the way to put it,” Rannazzisi said. “I do see someone. I’m starting to figure out more about myself. Co-dependency, and wanting people to like me and make people happy.”

Rannazzisi said his lie wasn’t planned.

“It wasn’t calculated at all,” he said. “It was as simple as sitting at the Comedy Store and everyone being like, ‘Hey, you’re from New York?’ ‘Yeah.’ ‘Were you just there? You were around?’ ‘Yeah, I was downtown.’ ‘You worked there?’ ‘Yeah, I did.'”

The comedian — who lost a deal with Buffalo Wild Wings after the truth came out — said that, quite suddenly, the chance to correct the record disappeared.

“You have like 15 seconds, I think,” he said. “To kind of go: ‘Wait, hold on. Stop. I’m sorry. That’s not true.’ If you pass that 15 seconds … now, it becomes a thing where you’re like, ‘Now, I have to be the guy that’s very strange and weird and just said I lied about 9/11.'”

Rannazzisi said his moral compass — and confidence — had evolved.

“I truly in all of my heart,” he said, “wish I had that voice that I feel like I have now that said: ‘Hey man. Take a breath. Relax. People are going to like you. People are going to understand who you are when they get to know you. You don’t need to lie about that. Take that back.'”

The 40-minute interview, just into its fifth minute, got even more intimate. Stern compared Rannazzisi’s plight to that of a “kid” on “America’s Got Talent,” on which Stern once was a judge, with a stutter.

“People cut him more of a break because they felt bad for him,” Stern said.

“Comedians are cruel people, especially in the beginning,” Rannazzisi said. The 9/11 story, he said, offered a cushion: “I kind of was like … maybe now, maybe people will not be as mean to me or not make as many jokes about me.”

Rannazzisi said the 9/11 story brought him the attention of “stars” at the Comedy Store, including Andrew “Dice” Clay, who nicknamed him “T2.”

“I don’t know how to ever tell anyone that this is not true,” Rannazzisi said he thought at the time.

As the years went by, Rannazzisi became known as the “9/11” comedian, he said. His wife was brought into the lie. And, by talking about it less, he hoped it would go away — but it resurfaced in interviews, including one with Pauly Shore in 2009. But, eventually, he told his family, he said — including his brother, who is a priest.

Today, however, Stern proved a crucial confessor, Rannazzisi said.

“The hurt and the pain and the nervousness that you hear now comes … because I know what I did was terrible,” he said. “I know that I hurt a lot of people … that’s why I wanted to come on here. Because I wanted to talk to you and your audience. Because you are personified [sic] with New York. And your audience, those are the people that truly, in my heart, I feel awful that my dumb mistake created a story that just hit a wound that should never have been touched.”

The full interview — which can’t be embedded here because of profanity — can be seen here. At its conclusion, Stern professed admiration for Rannazzisi’s candor.

Sort of.

“I don’t know you,” Stern said. “… But I’ll tell you what: I think it takes balls to come in here and talk about this. And I think you are asking for people’s forgiveness. And I think none of us are perfect. A lot of us have f—ked up royally.”

He added: “Not all of us. And there’s degrees of f—king up.”