If President Trump is eventually felled by the comical exploits of his personal lawyer, former New York City Mayor Rudy Giuliani, he will have no one to blame but himself. From the moment that he descended the elevator in 2015 to announce what would become his years-long grip on American politics and the national psyche, President Trump's greatest weakness has been his tendency to surround himself with cartoonish, wild-eyed cranks who are either too ignorant to understand their own lawlessness or so brazenly immoral that they don't care.

The Ukraine escapade is something that a half-competent, bottom-of-the-class lawyer with even a small shred of integrity could have warned (or tried to warn) the president away from. But that's not the kind of person who works for this president. Late-stage Rudy Giuliani, however he got this way, is the perfect functionary for Trump's Derp State — barely in control of his faculties, gripped by hallucinatory delusions, brimming with bloodthirsty loathing for Democrats, and perfectly willing to commit broad-daylight crimes to cover up other broad-daylight crimes.

As best we understand it today, Giuliani was tasked with using critical military aid and access to President Trump to extort the government of Ukraine into doing two things: forking over real or imagined dirt on Joe Biden, who at the time was President Trump's leading Democratic challenger for the presidency next year, and also to launch some kind of ginned-up investigation into the crackpot theory that the previous Ukrainian government was responsible for colluding with the Clinton campaign and the so-called Deep State in the U.S. to interfere in the 2016 presidential election. Giuliani did some of this work himself, traveling to Ukraine to shake down various officials, but he did not act alone.

This poorly scripted and unquestionably illegal plot was seemingly carried out with the full knowledge and cooperation of Secretary of State Mike Pompeo, U.S. envoy to Ukraine Kurt Volker, U.S. Ambassador to the European Union Gordon Sondland, and further required sacking the U.S. ambassador in Kiev, a respected foreign service veteran named Marie Yovanovitch, who stood in the way of using America's relationship with Ukraine — a country at the mercy of its larger and more powerful Russian neighbor — for the personal gain of the president and his associates.

There's also a B-plot: Giuliani seems to have concluded that executing the scheme required enlisting the help of two oafish bag men named Lev Parnas and Igor Fruman, who were arrested at Dulles Airport on Wednesday as part of a Southern District of New York investigation into campaign finance violations. They were about to flee the country for Vienna and appeared to have been funneling Russian slush money into the campaign coffers of Republicans and Republican-aligned entities who would help with the effort to recall Yovanovitch, in addition to serving as fixers in Kiev for Giuliani. And obviously, it wouldn't be a Trumpworld scheme if they weren't also trying to use their connections to Giuliani and Trump to get rich in the nebulous Ukrainian energy world. Notable: Giuliani himself was scheduled to fly to Vienna the next day.

The general shape of this stooge-ridden conspiracy was well known even as it was happening, and was reported on months ago, but the key event in the saga was President Trump's July 25 phone call with new Ukrainian President Volodymyr Zelensky, in which the president asked for the "favor" of investigations into the Bidens and his pet theory of 2016 after putting nearly $400 million in military assistance to Ukraine on hold. The brazenness of the request, and its obvious criminality, spurred a number of already-concerned officials in the U.S. government to put lips on whistles and start blowing.

All of this madness is almost incomprehensible. President Trump, having effectively neutered the Mueller investigation by finding one of the few savvy crooks in D.C. willing to be his attorney general, had no need to relitigate the issue of 2016 election interference, and he certainly had no need to so ostentatiously kneecap Biden, who has proven to be very much not up to the task of conducting a 21st-century presidential campaign and who likely would have lost his front-runner status regardless of whether his son's grifty-but-legal work in Ukraine ever saw the light of day. It's like a murderer getting caught after returning to the scene of the crime. Instead of fighting off an impeachment inquiry, the president could be focused on his trade war with China, or firing up the latest culture war episode, or doing any number of things that might have some conceivable political benefit.

It is incomprehensible, that is, until you remember that the president and his fellow travelers in Trumpworld rose to this position after a lifetime of unaccountable criming. Why pay the contractors when you can stiff them? Why create a thriving, legitimate business when you can rip off investors and slip out the side door? Why operate a legitimate university when you can simply scam people for half the overhead? Why obtain consent when you can just rape and grope and lie about it?

But the constant churn of betrayal and legal trouble and abuse in Trumpworld is also the source of his current troubles. In the private sector, there is at least the promise of instant riches in return for yoking yourself to a man like Donald Trump. But for smart, decent, law-abiding people to join him in government is another story. In comparison to other available and fully legal pathways of self-enrichment, taking a gig working for the executive branch of the United States is not terribly lucrative in the here and now.

Sure, down the road you may get that morning show on Fox or the cushy consulting job, but in the meantime you actually have to move to D.C. and do the thing. This is a problem even for above-the-board administrations. Trumpworld offers an additional disincentive, which is the high likelihood that merely stumbling into this family's orbit will lead you to require expensive, long-term legal representation. That's how the president ended up in bed with people like Paul Manafort and Steve Bannon and George Papadopoulos — for a while, before it became clear that President Trump could basically get away with anything because of congressional Republicans, these were the only people willing to risk their careers and freedom on behalf of a sub-literate game show host who was rather obviously running the most elaborate political grift in human history.

That brings us back to Giuliani, a man whose sordid journey from America's Mayor to spit-flecked, raving maniac will fascinate historians for years. In the spring of 2016, when many in the party were still praying for some kind of deus ex-machina at the Republican National Convention to derail Trump's nomination, Giuliani endorsed him. And sometime between 2008 and 2016, Giuliani seems to have completely lost his mind. His 2008 address to the Republican National Convention was boilerplate — some cheerleading for the McCain-Palin ticket and some scripted attacks on Obama and Biden. It was, if anything, completely unremarkable, the work of a consummate party loyalist doing whatever was asked of him.

In 2016, on the other hand, he delivered an utterly unhinged address: "The vast majority of Americans today do not feel safe," he screamed. About Donald Trump, he claimed, preposterously, "This is a man with a big heart who loves people, all people from the top to the bottom." Toward the conclusion he announced, ominously, "There is no next election." Like much of what Giuliani says these days, it was both hilariously bizarre and also terrifying.

That's the kind of hostage performance that wins you favor with the president. Of all the people who got suckered into Trumpworld, Giuliani was one of the few who brought with them an intact (if unearned) reputation in polite society. Trump either did not notice or did not care that Giuliani had lost the plot. And when he, absurdly, brought Giuliani on board in April 2018 as part of his defense team during the Mueller probe, he set himself on course for precisely the kind of presidency-destroying shenanigans that he eventually collided with. Five minutes of watching Giuliani on TV should have been sufficient to convince anyone that he should be as far away from any aspect of presidential strategy as possible.

Anyone, that is, except President Trump, for whom Giuliani's madcap nightly ravings have been a combination of validation and inspiration. In the end, the president appears to have allowed Giuliani to talk him into the most public crime ever committed by a president in American history.

We'll soon find out whether either man will pay for their transgressions. All we know for now is that even if Giuliani is working for free, President Trump is overpaying him.

Want more essential commentary and analysis like this delivered straight to your inbox? Sign up for The Week's "Today's best articles" newsletter here.