The party of Donald Trump began almost 10 years ago to the day, when John McCain tapped Sarah Palin to join his ticket.

It’s one of the most important moments of McCain’s career. He proved willing to empower a demagogue when he thought doing so would improve his political fortunes, exactly the sin so many of his colleagues in the Republican Party have committed since Trump won their party’s nomination.

“She’s not from these parts and she’s not from Washington, but when you get to know her, you’re going to be as impressed as I am,” McCain said when he announced his decision. “She’s got the grit, integrity, the good sense and fierce devotion to the common good that is exactly what we need in Washington today.”

Palin’s big moment in front of a national audience was at the Republican National Convention. Her big opener was to ask the crowd: “What’s the difference between a hockey mom and a pit bull?” Her answer: “Lipstick.”

Her showdown with Joe Biden at the first vice presidential debate was the most anticipated moment of the campaign. The debate began with a handshake between the two candidates and Palin asking Biden, “Hey, can I call you Joe?” It went downhill from there. She stumbled through or garbled talking points on basic policy questions, weaving in half a dozen references to “maverick” and “a team of mavericks.” The event drew 70 million viewers — the largest audience for a vice presidential debate in history. She dazzled conservatives.

National Review editor Rich Lowry described her as “so sparkling it was almost mesmerizing, [sending] little starbursts through the screen and ricocheting around the living rooms of America.”

Palin’s run solidified the Republican Party’s comfort with a candidate who would say absurdities. When Katie Couric wanted to know what newspapers she read, Palin answered, “Um, all of them, any of them that have been in front of me over all these years.”

Even though McCain and Palin were bested by Barack Obama and Joe Biden, Palin inspired a slew of copycats, unleashing a political style and a values system that animated the Tea Party movement and laid the groundwork for a Trump presidency.

McCain, who passed away at age 81, is remembered as a maverick, a man who crossed the aisle and built relationships with Democrats. But he also betrayed his own values hoping to win a presidential election, and sent the Republican Party down the path to Trump.

McCain sacrificed his values to win

McCain’s campaign was in free fall at the end of August 2008. He needed a Hail Mary, as many in the media put it at the time.

He seemed interested in tapping his close friend Sen. Joe Lieberman, a moderate Democrat, though a foreign policy hawk, who ran with Al Gore in 2000. Lieberman endorsed McCain over Obama. He wasn’t exactly a figure who’d excite ... anyone.

Palin, on the other hand, was a charismatic figure who campaign manager Steve Schmidt thought might appeal to women and to the party’s base. She was the governor of Alaska and had been the mayor of her small town, Wasilla. She’d also been called a “maverick” for confronting corruption in the state legislature, an identity that meshed well with McCain’s own.

Pretty quickly, though, Palin’s shortcomings started to show. She flubbed basic questions in interviews. Like: Why did you think Roe v. Wade was a bad decision? (Abortion was a central theme of Palin’s politics.)

McCain’s decision to pick her was called into question right away. How did McCain miss the signs that maybe she wasn’t up to the job?

In 2008, I flew to Wasilla, Alaska, the day after Palin was tapped. I headed to the city clerk’s office to pick up copies of meeting minutes from when she was mayor. I assumed the McCain campaign had done the same, but no. As I wrote at the time:

I just got off the phone with the very helpful city clerk at the Wasilla City Clerk’s office, Kristie Smithers, who is pulling some documents for me from when Gov. Sarah Palin was mayor. I told her I appreciated her help, since I’m sure she’s been bombarded with requests these last few weeks. The clerk’s office keeps all City Council meeting agendas, minutes, legislation, ordinances, etc. She chuckled. Then she told me that I’m the first person who has asked her office for anything.

McCain was prepared to put Palin a “heartbeat away from the presidency” without even checking if she could do the job. Instead, he picked her because she seemed like a good play to the base.

Conservatives had long dallied in race baiting, like the the push poll credited with dooming McCain in the 2000 presidential primary in South Carolina. Voters were asked if they minded that McCain had a black daughter. (One of McCain’s daughters, Meghan McCain, is white; the other, Bridget McCain, was adopted from Bangladesh.)

While McCain was credited with cutting off a woman at a rally who seemed to be saying something offensive about Barack Obama’s background, his running mate was on stages accusing Obama of “palling around with terrorists.”

Palin was playing straight into the hands of conspiracy theorists who doubted Obama’s citizenship. She participated in painting him as “other” — someone who couldn’t be a patriotic American.

Palin unleashed reality politics

McCain and Palin lost, but after the election, Palin stayed in the limelight for a time. She got a deal with Fox News and traveled the country, endorsing and stumping for Tea Party candidates.

Schmidt, who had pushed McCain to select Palin, was depicted in the HBO version of the reported story of the 2008 campaign, Game Change, as racked with guilt for his role in the decision.

“This wasn’t a campaign, it was a bad reality show,” he says.

Palin herself went on to sign an actual deal for a reality TV show.

Over the next few years, Palin began to fade, but she was replaced by a small army of candidates who picked up her mantle. More and more, campaigning became about resentment and identity — us versus them. The white base of the Republican Party was energized and took back the House in 2010.

McCain made friends with politicians across the aisle, from Joe Biden to Hillary Clinton to Joe Lieberman. He was beloved by the press for many years for his cordial, friendly style. He loved to talk about himself as a straight shooter (his campaign bus was “the Straight Talk Express”).

He put this reputation on the line for Palin. She used it to gain credibility and a foothold in the national debate.

After being diagnosed with cancer, McCain still defended Palin’s performance but said he regretted not picking Lieberman as his running mate.

Correction: The original version of this story incorrectly stated that Sarah Palin said at the first vice presidential debate in 2008: “What’s the difference between a hockey mom and a pit bull?” Her answer: “Lipstick.” Palin said it on the stage at the 2008 Republican National Convention.