The correspondent, one of the last to be hired by former host Jon Stewart, explains that the on-air argument inspired a piece that led to his being hired by the Comedy Central late-night show.

In an interview on SiriusXM's Dean Obeidallah Show a little over a year after he got hired on The Daily Show, Minhaj explains that it was somewhat inspired by the Affleck-Maher exchange that impressed then-host Jon Stewart.

Minhaj explained that he got a chance to audition for the show after Michael Che left to co-host "Weekend Update" on Saturday Night Live. He got through the first round of auditioning, in which he sent in a tape featuring a segment he'd like to do on the show, and was asked to come in and do a screen test — with another original piece. But Minhaj was afraid he didn't have another good idea.

"I'm not a Larry David," he says. "I don't have a Curb Your Enthusiasm and a Seinfeld in me."

But the weekend before his screen test, Real Time With Bill Maher gave him the inspiration for another bit.

"I just remember like giving it a standing O in my living room," he explains. "I was like, 'Holy crap, we made it. We have our first A-list celebrity. Ben Affleck has backed the Muslim community. He may not be the hero we want but he's the hero the Muslim world needs.' "

Minhaj adds: "I was so happy, I forgave him for Gigli. I forgot about that movie. Daredevil never happened. I wrote this piece and I was like, 'Oh, this is the angle.' "

The exchange inspired a piece Minhaj called "Batman vs. Bill Maher."

After he presented it to Stewart, the host said "Good job, young man." But as Minhaj was leaving, Stewart offered him a job.

"He goes, 'Hey, man, I'll see you Monday, right?' And I was like, 'What?' And he was like, 'I'll see you Monday because you work here.' It was surreal," Minhaj recalls.