Brett Kavanaugh must have been smiling as the returns came in on Election Day, because it is now clear that the Democrats’ campaign to destroy him will go down as a massive blunder. It failed to keep Kavanaugh off the court. It cost Democrats their chance to regain control of the Senate. And it gave Republicans an expanded Senate majority that will allow them to confirm an even more conservative justice next time around.

Today, Kavanaugh sits on the Supreme Court hearing cases. Meanwhile, Democratic Sens. Heidi Heitkamp of North Dakota, Joe Donnelly of Indiana and Claire McCaskill of Missouri are packing up their Senate offices – thrown out by voters furious over their party’s brutal campaign of character assassination against Kavanaugh. West Virginia Sen. Joe Manchin was the only Democrat who voted for Kavanaugh, and he survived – but just barely. Two weeks before Election Day, Manchin was leading by double digits, but Tuesday he won by just over 3 points. Had he voted against Kavanaugh’s confirmation, he would likely have been toast as well.

The Democrats’ smear campaign also cost them the chance to pick up Republican seats. In Tennessee, Rep. Marsha Blackburn was trailing former Democratic Gov. Phil Bredesen by 5 points in a CNN poll before the Kavanaugh hearings. She ended up winning by just under 11 points, as the Democrats’ mistreatment of Kavanaugh united Tennessee Republicans behind her. The Kavanaugh smear no doubt also played a role in energizing Republican voters in Arizona, where Republican Rep. Martha McSally appears to have squeezed out a narrow victory, and in Texas, where Sen. Ted Cruz defeated Rep. Beto O’Rourke by just 2.6 points in one of the reddest states in the union.

None of that might have been possible had it not been for the Democrats’ horrific treatment of Kavanaugh. As Senate Majority Leader Mitch McConnell put it, the failed effort to stop Kavanaugh was like an “adrenaline shot” for the Republican base. Republican voters were outraged to see a good man accused, without a shred of direct evidence, of sexually assaulting a teenage girl. They were disgusted by Senate Democrats’ insistence that the burden was on Kavanaugh to prove he didn’t do it and by Democrats’ disregard for the presumption of innocence. They were energized by Kavanaugh’s willingness to fight back, declaring his treatment by Democrats a “national disgrace.” And they punished the perpetrators of that disgrace Tuesday.

Now Republicans have not only an expanded Senate majority but also a pro-life majority. Reports indicated that Trump was close to nominating Judge Amy Coney Barrett, a devout Catholic and mother of seven, to replace retiring Justice Anthony Kennedy. Barrett became a folk hero among religious conservatives after Dianne Feinstein of California, ranking Democrat on the Senate Judiciary Committee, grilled her over her Catholic faith during her confirmation hearings as a federal appellate judge last year. “The dogma lives loudly within you,” Feinstein told Barrett, suggesting that her faith disqualified her.

Outraged conservatives rightly castigated Feinstein for applying an unconstitutional religious test. As Harvard Law professor Noah Feldman explained, Feinstein “insinuated an anti-Catholic stereotype that goes back at least 150 years in the U.S. – that Catholics are unable to separate church and state because they place their religious allegiances before their oath to the Constitution.”

Barrett was confirmed. But when it came to the Supreme Court, Trump calculated that with a razor thin-Republican majority he needed what was supposed to be a safer pick and went with Kavanaugh instead. Now, with an expanded, pro-life Senate majority, Trump no longer has to worry about losing a few Republican votes next time around.

At every stage of recent Supreme Court fights, Democrats have miscalculated. Their mindless decision to filibuster Neil Gorsuch paved the way for Senate Republicans to get rid of the filibuster for Supreme Court nominees – making it possible to confirm Kavanaugh by simple majority. And if Barrett ever makes it on to the Supreme Court, Democrats can thank their defamatory treatment of Kavanaugh.

The lesson for Democrats should be clear: Character assassination does not pay. Quite the opposite, it backfired – big time.