EVEN If all the polls predicted it, this election result was a stunner by any measure. On November 21st, Louisiana, among the reddest of all American states, became the first in the deep South to elect a Democratic governor in more than a decade. The last time the Pelican state elected a Democrat to statewide office was in 2008. And yet here was John Bel Edwards—a little-known state representative from a rural area best known for bequeathing Britney Spears to the world—positively thumping his GOP opponent, Senator David Vitter. His margin of victory was 56-44, a landslide by most definitions. But the major story line of this election was not the ascent of Mr Edwards, who, even after his surprising win remains something of a mystery to most Louisianians. It was the epic crash-and-burn of Mr Vitter, once the state’s dominant Republican, now on his way to Palookaville.

Mere months ago, Mr Vitter appeared a potent political force. He had raised more money than his three major opponents combined. He was considered a master strategist: he had never lost a race over more than two decades in office. And he had helped elect other conservatives—most recently his fellow senator, Bill Cassidy, in 2014—who then owed him a debt. The presumption was that he would win the governorship, appoint his replacement to the Senate, and rule as Louisiana’s unquestioned boss for the next eight years.

But Mr Vitter was exposed as something of a paper juggernaut in Louisiana’s “jungle primary” last month, when he took just 23% of the vote, barely enough to hold off two other GOP candidates and far behind Mr Edwards, who got 40%. And to achieve even that modest victory, Mr Vitter had to run a scorched-earth campaign against his Republican rivals, one of whom went on to endorse Mr Edwards and one of whom simply sat out the run-off, seething.

On the night of November 21, after conceding to Mr Edwards, Mr Vitter announced he wouldn’t even seek re-election to the Senate next year—effectively ending his political career. The announcement may have been unnecessary: Mr Vitter’s spectacular loss would have guaranteed him a brace of Republican challengers next year had he decided to try and hang on.

So what happened? The clearest answer is that the election was a referendum on Mr Vitter, and he lost. His obvious Achilles heel was the prostitution scandal that emerged in 2007, when his telephone number came up repeatedly in the records of the infamous “D.C. Madam.”

That episode, old as it is, had some staying power, and his opponents used it like a cudgel in this election cycle. None did so in such devastating fashion as Mr Edwards, who crafted a brutal ad that showed Mr Vitter missed a vote to honor fallen soldiers on a day he took a call from the madam, thus choosing “prostitutes over patriotism,” in the catchy parlance of the commercial.

But Mr Vitter’s dalliance with prostitution doesn’t alone explain why voters rejected him. After all, in 2010, when the scandal was much fresher, Louisianians voted overwhelmingly to send him back to Washington for another term, and that time, his opponent was a better-known and well-liked congressman, Charlie Melancon.

So what was so different in 2015? A few key things: Five years ago, Mr Vitter had no strong Republican rival in the race, meaning he was able to mostly stay true to Ronald Reagan’s famous “11th Commandment”: “Thou shalt not speak ill of any fellow Republican.” He simply trained his guns on Mr Melancon, portraying him as a slavering Obamaphile, and he came away with 57% of the vote. The same tactic worked like a charm last year in Mr Cassidy’s win over longtime Democratic Senator Mary Landrieu in a campaign orchestrated by Mr Vitter.

But party labels mean much less in Baton Rouge, the capital, than they do in Washington, DC. True, the state’s voters are reliably Republican, and the president polls terribly in the Pelican State. And the message that Louisiana must send a conservative to Washington, DC, to block Mr Obama’s left-wing agenda is a reliable seller. But trying to wrap the Obama mantle on a state representative trying to become governor—as Mr Vitter did over and over again—proved far less successful.

It remains something of an open question whether Bobby Jindal’s deep unpopularity as governor – his approval ratings are hovering in the 20s, and the state is mired in a budget crisis – was a major factor in Mr Vitter’s demise. But the idea that voters were expressing some sort of broader disgust seems like wishful thinking on the part of state Democrats. As Mr Jindal’s handlers have noted, other conservatives on the ballot did just fine Saturday, suggesting that the GOP brand is still in good standing in Louisiana. It is the Vitter and Jindal brands that appear to be in the tank.

It also can’t be overlooked that Mr Edwards—little known though he was—ran a clever campaign, and Mr Vitter ran a poor one. Mr Edwards held his powder on his rival until the run-off, knowing Mr Vitter was probably the only one of the three Republican candidates he could beat. Once the run-off began, he started clubbing him in earnest, while doing his best to lay claim to his own conservative bona fides: pro-gun; anti-abortion; West Point; former army ranger; family history of law enforcement. When the state’s sheriffs voted to endorse Mr Edwards—the group has often leaned Republican—it helped to blunt Mr Vitter’s claim that Mr Edwards was soft on crime and was planning to release thousands of “thugs” from state prisons.

Mr Vitter, meanwhile, despite his reputation as a formidable campaigner, never found his rhythm, and had a few notable mis-steps. None was more amusing than the one in which a private investigator working for Mr Vitter got arrested after surreptitiously taping a New Orleans-area sheriff and his cronies at a coffee shop. Confronted, the PI made a break for it, and was collared while hiding behind an air-conditioning unit in a suburban yard.

It was never clear whether the operative actually did anything wrong, other than trespassing. But the episode resonated with the public: it reinforced their idea that Mr Vitter was a Nixonian creep who spied on his enemies. And the sheriff, Newell Normand, a longtime despiser of Mr Vitter, had a field day with it, treating reporters to an hour-long press conference in which he said he had turned over various materials to the FBI.

Mr Normand, a Republican from Jefferson Parish—the state’s second-largest county, with about 10% of its population—later cut an anti-Vitter commercial. The ad didn’t mention Mr Edwards. Rather, Normand just spoke of what a distasteful and selfish person Mr Vitter was. On November 21st, Mr Edwards edged Mr Vitter in Jefferson Parish, which typically is reliably Republican, and also happens to be Mr Vitter’s home county. It also happens to be where he has many of his fiercest foes, enemies earned over two decades of bare-knuckled politics. Lots of them were smiling on Saturday night.