I was working on the production staff of NBC's “Saturday Night Live” when Rudy Giuliani, then the mayor of New York City, appeared on the program a few weeks after 9/11. It was a unique time in American history, and Giuliani’s appearance would go on to become an iconic moment in the show’s history as well. After Paul Simon gave a somber rendition of "The Boxer," SNL creator Lorne Michaels and Giuliani stood in the center of the stage surrounded by a symbolic group of New York police and firefighters. “Can we be funny?” Michaels asked, to which Giuliani replied: "Why start now?"

Flash forward 17 years and Giuliani is no longer delivering the jokes on SNL. Instead he has become a punchline, as we saw on SNL this past Saturday. Starting with the show’s cold open, President Donald Trump's new attorney spent a lot of time squarely in the comedic cross hairs. Playing her fellow New Yorker in drag, the amazing Kate McKinnon skewered Giuliani’s confusing and sometimes contradictory media tour on behalf of his new client, the president. “I’m supposed to be doing 24 more talk-show appearances today,” McKinnon-as-Giuliani said. “I'm trying to make it like an advent calendar, where I reveal one new crime on each show.”

SNL’s Weekend Update segment also opened with a run of jokes comically fillettng the former mayor. Faux-anchor Colin Jost called Giuliani’s confirmation that Trump had reimbursed Michael Cohen’s payment to Stormy Daniels “the best confession I’ve seen on TV that didn’t end with ‘Created by Dick Wolf’” — a nod to New York’s own “Law & Order.”

Get the think newsletter. This site is protected by recaptcha

And it wasn’t just SNL. NBC "Late Night" host Seth Meyers mocked Giuliani for claiming on Fox News that Hillary Clinton had received overly courteous treatment by investigators looking into her emails: “He’s like a Bond villain who can’t afford a real cat,” Meyers said. Over on ABC, Jimmy Kimmel theorized that Team Trump’s strategy was to “put someone out there who’s even nuttier than Trump to make him look normal by comparison.” (“It’s working,” Kimmel added.) Meanwhile on "The Daily Show," Trevor Noah suggested Giuliani “take a page from DJ Khaled and stop using your mouth for a while” until he could get all his facts straight, a recommendation reportedly echoed by Trump himself.

Giuliani’s very public fall has been several years in the making, starting when he first hitched his star to then-candidate Trump in a desperate effort to regain political relevancy.

Giuliani’s transformation from America’s Mayor to late-night fodder now appears complete. But to be clear, that metamorphosis began long before Giuliani put his foot in his mouth about Michael Cohen. Giuliani’s very public fall has been several years in the making, picking up steam when he hitched his star to then-candidate Trump in a desperate effort to regain political relevancy. This decision certainly raised his profile, but in the process it has destroyed decades of sometimes grudging credibility.

The image of a man who strode through the smoking ruins of the World Trade Center with President George W. Bush and Sen. Hillary Clinton has been replaced by the image of a seemingly unhinged man ranting about President Barack Obama, praising Trump and screaming words like “America” onstage at the 2016 Republican National Convention. That performance lead more than one commentator to publicly wonder if Giuliani might literally be losing his mind.

While promoting Trump during a campaign stop in August of 2016, Giuliani inexplicably claimed that during Bush’ two terms in office ”we didn’t have any successful radical Islamic terrorist attack in the United States.” This despite the obvious fact that America suffered the worst terror attack in modern U.S. history during Bush’s presidency.

And the list continues. During Giuliani’s countless 2016 appearances as a Trump surrogate he pushed a series of outlandish ideas including the conspiracy theory that Hillary Clinton was suffering from mysterious health issues that the media was ignoring. When pressed by a "Fox News Sunday" anchor for evidence, Giuliani urged viewers to Google the words “Hillary Clinton illness" and “take a look at the videos for yourself."

A man willing to compare Trump to a literal saint is a man with very little shame. But it would take two more years for Giuliani’s credibility to hit rock bottom.

Perhaps the strongest sign, however, that Giuliani was willing to defend Trump at the expense of his own integrity came in October 2016 after the "Access Hollywood" video tape showed Trump bragging about grabbing women by the genitals without their consent. As Trump’s campaign reeled and Republican rivals recoiled, Giuliani made the rounds on TV shows minimizing Trump’s comments with statements like “men at times talk like that” and “he who hasn't sinned, throw the first stone here." Giuliani at one point even compared Trump to St. Augustine, a one-time underachiever who converted to Christianity, swore off sex and become one of the religion’s most revered theologians. If St. Augustine could change, Giuliani argued, so could Trump.

A man willing to compare Trump to a literal saint is a man with very little shame. But it would take two more years for Giuliani’s credibility to hit rock bottom. At one time the name Giuliani may have elicited respect — but today all it elicits are laughs.

Dean Obeidallah, a lawyer, hosts "The Dean Obeidallah Show" on SiriusXM radio's Progress channel and is a columnist for The Daily Beast.