What if John McCain hadn’t run for president in 2008?

Donald Trump might not be sitting in the White House today.

At first glance, that might sound odd. The six-term Republican senator, who passed away Saturday, has been hailed as an outspoken opponent of the president, while Trump himself despised McCain and famously claimed the former prisoner of the Vietcong was “not a war hero.”

McCain has also been held up, by both right and left alike, as an exemplar of political civility, integrity, and decency; a nonracist Republican; the anti-Trump. Bernie Sanders called him “a man of decency and honor;” Alexandria Ocasio-Cortez praised him as an “unparalleled example of human decency.”

Nothing could be further from the truth. Even if you discount the fact that McCain once publicly dismissed his wife as a “cunt.” Or that he referred to two of his fellow Republican senators as a “fucking jerk” and an “asshole.” Or that he mocked Chelsea Clinton, then a teenager, as “ugly.” Or that he refused to apologize for calling his Vietnamese captors “gooks.” Or that he slammed anti-war protesters as “low-life scum.”

Ignore all of that and you’re still left with his hate-mongering, race-baiting, Trump-precursing 2008 presidential campaign — against the first black Democratic nominee for the White House. How have the vitriol and smears of a decade ago been so easily forgotten by his eulogizers? So casually consigned to the media memory hole?

Remember: McCain introduced the loathsome Palin to the world in August 2008, when he plucked her from Alaskan obscurity and made her his running mate. In doing so, he granted prestige, influence, and credibility to a know-nothing demagogue and conspiracy theorist; a woman who thrived on racial and cultural resentment and would later become a leading figure in both the tea party and the “birther” movement. Sound familiar? Palin, as the Washington Post’s Dana Milbank wrote in 2016, was “politically, the Mother of Trump.”

As even Nicolle Wallace, MSNBC host and former adviser to McCain, conceded during the 2016 campaign: “Mr. Trump is riding the wave of anxiety that Ms. Palin first gave voice to as Senator John McCain’s running mate. Mr. Trump has now usurped and vastly expanded upon Ms. Palin’s constituency, but the connection between the two movements is undeniable.”

Is it any wonder then that the New York Times’s Jonathan Martin, in an otherwise fawning piece on the late Arizona senator in May, observed how “many in Mr. McCain’s own party believe that, by selecting Sarah Palin as his running mate in 2008, he bears at least a small measure of blame for unleashing the forces of grievance politics and nativism within the Republican Party”?

Remember also: McCain has never apologized for picking Palin. As Martin reported in his piece, McCain did express regret that he hadn’t selected his friend and fellow Sen. Joe Lieberman as his 2008 running mate, but “he continues to defend Ms. Palin’s performance.” Yes, her racist and conspiratorial performance. That performance.

It’s easy, though, to blame all of the Trumpish campaign of 2008 on the former governor of Alaska. It was McCain, however, who unleashed and empowered her — and failed to restrain or rebuke her as she incited angry crowds against Obama. “The growing furor in the Republican Party was something that we, as a campaign, failed to address,” admitted Wallace. And, while it was Palin who shamelessly accused Obama of “palling around with terrorists” and dog-whistled to rally-goers that the black Democrat wasn’t “a man who sees America the way you and I see America,” it was McCain who spent much of the days and weeks before the election trying to tie Obama to his former acquaintance, Bill Ayers, the co-founder of a Vietnam War-era militant group. It was McCain who authorized his campaign spokesperson to remind reporters of “Barack Obama’s long association with a domestic terrorist.” The spokesperson added, “The American people know radical when they hear it, and John McCain is not the candidate in this election they should be concerned about.”

You think shouting “lock her up” and “CNN sucks” at Trump rallies is bad? McCain-Palin rallies in 2008 featured Republican supporters in the audience shouting “Traitor!”, “Terrorist!”, “Off with his head!”, and “Kill him!” at the mere mention of Obama’s name. “Watch the tape of the guy screaming, ‘He’s a terrorist!’ McCain seems to shudder at that, he rolls his eyes … and I thought for a moment he’d admonish the man. But he didn’t,” wrote Joe Klein in Time magazine on October 9, 2008. “True enough: he no longer has his honor. But we are on the edge of some real serious craziness here and it would be nice if McCain did the right thing and told his more bloodthirsty supporters to go home and take a cold shower. But McCain hasn’t done the right thing all year.”

On October 11, 2008, Democratic congressman and civil rights icon John Lewis lambasted both McCain and Palin for “sowing the seeds of hatred and division” and even compared their dangerous campaign rhetoric to that of arch-segregationist George Wallace.

Some conservatives expressed outrage with McCain, too. David Frum accused him of “whipping Republicans and conservatives into a fury that is going to be very hard to calm after November.” Andrew Sullivan urged the Arizona senator to desist from dangerous and inflammatory attacks on a young, black Democrat: “For God’s sake, McCain, stop it. For once in this campaign, put your country first.” Republican activist and former McCain ally Frank Schaeffer denounced the GOP presidential candidate for “playing with fire,” unleashing a “monster of American hate and prejudice,” and holding rallies that “are beginning to look, sound, feel and smell like lynch mobs.”

Yet, astonishingly, all of this has been whitewashed from McCain’s political record. None of it makes an appearance in the raft of unctuous obituaries that have been published since Saturday. Instead, a single moment from that campaign — in which a woman at a town hall accused Obama of being “an Arab” and McCain replied by saying, “No ma’am, he’s a decent family man” — has become the only thing anyone seems to remember from it. Over the past couple of days, the clip of that exchange has gone viral on Twitter, with everyone from former Bush administration official Fran Townsend to liberal author Stephen King, citing it as proof of the late senator’s “character and integrity” and his “finest moment.”

Sorry, what? I have never understood how this was a badge of honor for McCain — nor do many Arab-Americans, for that matter. Actor Ben Affleck summed up the problem on “Real Time with Bill Maher” a few days after the incident. “What if someone said, ‘I heard he’s a Jew.’ ‘No, no, he’s not a Jew, he’s alright … he’s a decent guy’?” Affleck asked the audience. “‘Arab’ and ‘good person’ are not antithetical to one another. … We’ve allowed this idea where denying … that Obama is not an Arab, nor is he a Muslim, we’ve allowed that denial to turn into the acceptance of both of those things as a legitimate slur.”

In 2008, McCain could have pushed back against this idea, expressed by the increasingly Trumpish GOP rank and file, that there was something wrong with being Arab or Muslim; after all, his fellow Republican and Vietnam veteran Colin Powell did so rather eloquently on television around the same time. But, no, McCain, whether wittingly or unwittingly, allowed a distinction to be drawn between being an Arab and being a decent family man. Some suggest he should be given the benefit of the doubt on that remark because it was a spur-of-the-moment, off-the-cuff response to a rambling and racist questioner; his intent, they say, was noble.

Maybe. But context matters. How do you explain the rest of his shoddy election campaign? Shamefully, he ran for president while repeatedly claiming his black opponent was a friend of terrorists. Embarrassingly, he chose to give the nativist Palin a national platform she didn’t deserve. Disgracefully, he stayed silent as his own supporters called for the killing and beheading of Obama.

So the reality is this: if you were drawing up a list of Americans who share blame for the rise of Donald Trump, John McCain’s name would have to be somewhere near the top of it. With the noxious Palin at his side, the Arizona senator ran a nasty, bigoted, and desperate presidential campaign in 2008 that paved the way for Trump and Trumpism in 2016.

And you don’t have to take my word for it. It’s been reported that McCain requested for Obama to speak at his funeral. Perhaps the former president can start his eulogy by repeating aloud what he told New York magazine’s Jonathan Chait in October 2016: “I see a straight line from the announcement of Sarah Palin as the vice-presidential nominee to what we see today in Donald Trump … and the shift in the center of gravity for the Republican Party.”

Thanks, John McCain. Thanks a lot.