Fifteen years ago, Rudy Giuliani could do no wrong.

Approaching the end of his second term as mayor of New York City, he had overseen major reductions in crime and significant improvements in the quality of life of New Yorkers. He also received public sympathy in 2000 when he revealed that he had prostate cancer.

Then came the terrorist attacks of 9/11, after which Giuliani projected a message of inclusion and fearlessness. He played a very visible role in the cleanup effort, coordinating the city's response to the attacks, making frequent appearances on TV and radio and generally helping to unite the city and calm the nerves of a shocked nation.

All of this earned Giuliani the title of "America's mayor." In 2002, he even received honorary knighthood from Queen Elizabeth II.

Over the next few years, Giuliani was a highly sought after consultant and speaker and was regularly referred to as a possible future senator, governor or president.

Giuliani was still riding high enough in 2007 to be considered the front-runner for the Republican presidential nomination — not bad for a politician who'd never made it beyond municipal politics.

But Giuliani's reputation has seen a remarkable decline since then. First there was the failed 2008 campaign, during which he spent $50 million but won just one delegate. There have also been shady business dealings and allegations that he exaggerated his role in the wake of 9/11, or even exploited the attacks to make millions of dollars.

But it took Barack Obama and Donald Trump to bring out the worst in Giuliani. Over the last year, Giuliani has ranted about how Obama doesn't love America because he "wasn't brought up the way you were brought up and I was brought up." Giuliani has ferociously opposed criminal justice reforms that many conservatives back, and he has attacked the Black Lives Matter movement as "inherently racist," reminding many of the less than cordial relationship Giuliani had with New York's black community during his time as mayor.

As a surrogate for Trump, Giuliani delivered a spiteful and snarling address at the Republican National Convention and, more recently, has been pushing conspiracy theories about Hillary Clinton's alleged health problems.

How to explain Giuliani's descent into crankery and conspiracy theory mongering? It could be that once he was freed from the constraints of running for political office, he began speaking more candidly. Whatever it is, Giuliani is a shell of his former self.

Daniel Allott is deputy commentary editor for the Washington Examiner