Carlos Barria / Reuters

Before he decided to run for president for the first time, Rick Perry had never lost an election. He had been a member of the Texas legislature, the state agriculture commissioner, the lieutenant governor (under Governor George W. Bush), and governor for a record-setting 14 years. But he had never been a loser.

And so, in August 2011, when Perry strode onto a stage in Charleston to announce his first presidential campaign, it was easy to see why Republican activists wanted him in the race. The establishment’s preferred candidate, Mitt Romney, didn’t excite the party base; the other candidates were, to varying degrees, small-timers and buffoons. (Sound familiar, Jeb Bush?) Here was someone who could speak to the nascent Tea Party and the evangelical right and the business class, someone who had governed a big state while railing against Washington. He rolled into the room with a phalanx of Texas Rangers, big and tough and sharp. “It is time to get America working again!” he said, and the ballroom roared.

It was pretty much all downhill from there.

Perry’s 2012 campaign is remembered for one of history’s more remarkable debate gaffes—oops—but his slide began earlier. Joking about secession had been amusing in Texas; quips about stringing up the Fed chairman didn’t play so well in New Hampshire. When he said, of those who criticized his relatively moderate record on immigration, that they didn’t “have a heart,” conservatives revolted. Perry’s poll numbers had already started to slide by the time “oops” came around in November 2011. After coming in fifth in the Iowa caucuses, he saw the writing on the wall and dropped out.

Perry’s 2012 run was testament to the way the glare of the national stage can wrongfoot even the most dominant state-level pol. (Sound familiar, Scott Walker?) Later, he confessed he hadn’t been feeling himself—he had had back surgery just a few weeks before starting the campaign and was on heavy doses of painkillers. Having watched all of his Texas gubernatorial debates, where his performances were not half bad, I believed this explanation. But Perry’s Texas critics had always considered him an airhead. (The late liberal columnist Molly Ivins dubbed him “Governor Goodhair.”) The “oops” moment seemed to confirm it.

After 2012, Perry changed: He started wearing those stylish glasses, which came to symbolize a larger makeover, from swaggering red-state conservative into a wannabe cosmopolitan. He gave policy addresses and talked about moving to California. He adopted the mien of an earnest student, inviting experts to Texas to learn from them, then inviting reporters to talk about what he’d learned. But even as Perry was getting all ivory-tower, Texas politics was moving in the other direction. Perry’s lieutenant governor, David Dewhurst, lost a Senate primary he was supposed to have locked up to an upstart Tea Partier named Ted Cruz. Conservatives in the legislature fought Perry’s projects and won primaries up and down the ticket. The governor once regarded as a more extreme and ideological version of George W. Bush began to look downright moderate.

It was, of course, the prelude to a comeback, or an attempted one. For his second presidential campaign, Perry wanted to redeem himself by being the smartest guy in the room. He gave a thoughtful speech about racism at the National Press Club, backtracking on his once-vocal support for the Tenth Amendment. He repudiated the Texans who were convinced that U.S. military training exercises were really a secret prelude to martial law. He railed against Donald Trump and “Trumpism,” calling the flamboyant Republican frontrunner a demagogue, a carnival barker, and a “cancer on conservatism.” Nobody was more shocked by this newly thoughtful character than the Texas Democrats Perry had driven into near-extinction. “Where was this guy for the last 20 years?” asked Jason Stanford, a Democratic consultant and columnist.

Since his surgery, Perry couldn’t wear cowboy boots anymore. But he still had the power to blow away the room with a speech. At the Conservative Political Action Conference last year, for example, he took the toughest speaking slot—9 a.m.—and somehow managed to bring the sleepy crowd to its feet. But in the straw poll afterward, he drew just 3 percent. People liked him. They liked hearing him talk. They just didn’t think he should be president, and nothing Perry did could convince them otherwise. (Sound familiar, Chris Christie?) In a presidential cycle where we keep hearing how paramount the power of authenticity is for voters, Perry is a reminder that charisma only gets you so far.

He’s also a reminder of the immigration issue’s continuing power to tear the GOP apart—a fissure Republicans were determined to solve after 2012 but have instead seen only deepen, aided by Trump. Like many Texas Republicans, Perry has been close enough to the border issue to see it in subtler terms. For a time, the Texas GOP even had an immigration-reform plank in its platform. But as Perryism has been replaced in Texas by Cruzism, that nuance, too, has fallen by the wayside. In the speech Friday in which he announced he was suspending his campaign, Perry made this his parting warning: “We cannot indulge nativist appeals that divide the nation further,” he said, calling for an immigration debate “without inflammatory rhetoric, without base appeals that divide us based on race, culture and creed.”

The smart-guy role he adopted for the 2016 campaign never quite fit Perry. He seemed tentative and trying-too-hard in the first Republican debate, which saw him—Texas’s longest-serving governor!—relegated to the pre-prime-time junior-varsity stakes. In public appearances, his folksy delivery could be at odds with his new, multisyllabic scripts. But Perry was no idiot. In Texas, he took a structurally weak governorship and gave it heft, using appointments to strengthen and consolidate executive power. He didn’t win all those elections by accident. And in the end, his political smarts forced him to see the reality. He won’t be president, but in his final campaign, Rick Perry may have found some measure of redemption. Adios, mofo.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.