Though the confirmation of Justice Brett Kavanaugh will be best remembered for the drama of last-minute sexual assault allegations, it will also provide valuable lessons for the presidents and senators who will nominate and confirm future justices to the nation's highest court. Here are a few of the most important lessons, informed by my many years of closely observing the Supreme Court appointment process.

Offense is the best defense 

Over the last three decades, Senate Democrats have attempted to destroy three Supreme Court nominees: Robert Bork, Clarence Thomas and Brett Kavanaugh. Judge Bork, blindsided by the demise of the nonpartisan tradition of judicial confirmations, did not go on the offensive when in 1987 Democrats accused him of favoring segregated lunch counters, artistic and literary censorship, and other horrible positions.

Schooled by Bork's defeat, Clarence Thomas launched a counterattack in 1991 when Anita Hill claimed he had sexually harassed her. After accusing senators of "a high-tech lynching for uppity blacks" who don't toe the liberal line, public opinion moved in Thomas's favor and he was confirmed to the Court.

Two weeks ago, Brett Kavanaugh summoned his inner Clarence Thomas, vehemently defending his integrity and attacking Democrat senators for their "grotesque and coordinated character assassination." Kavanaugh's impassioned testimony unified Republicans in the Senate and across the country and saved his nomination.

Judicial nominees preparing for Senate hearings are advised to be cautious, modest and deferential to senators. But after Justice Kavanaugh's confirmation, that advice requires some rethinking. At very least, when responding to the politics of personal destruction, a nominee's best strategy is to go on the offensive.

Another president may well have hesitated to defend a nominee against assault allegations or may have withdrawn the nomination. Instead, Donald Trump proved that fighting back is also the best approach for a president defending his nominee.

Although recent campaigns of personal destruction have been limited to Republican Supreme Court nominees, the wisdom of fighting back would presumably apply equally to a Democrat nominee facing such an attack.

Thread the needle 

Justice Kavanaugh survived the assault allegations only because Senate Republicans were unified – with the exception of Lisa Murkowski – and there were no real vulnerabilities in his record that Democrats could exploit to pry away moderate Republicans.

That was possible because President Trump managed to thread the needle with a nominee whose record appealed to Republicans of all stripes and excited the GOP base, while simultaneously providing little meaningful ammunition to opponents who would inevitably seek to portray the nominee as hostile to women, minorities, workers and the like.

Some of the people on Trump's list of potential Supreme Court nominees would not have met the latter condition.  Judge Amy Coney Barrett likely would have run into trouble on the issue of abortion, for example.  Many others on the list would have satisfied the base without exciting it, if only because they were not as well known.

Threading this needle is no easy feat, yet President Trump has done it twice with Justice Neil Gorsuch and now Kavanaugh. Future GOP presidents would be wise to study and copy Trump's selection process.

Think before you play to the base 

When Gorsuch was nominated last year, logic suggested that Senate Democrats not filibuster his nomination because Republicans likely would respond with the “nuclear option,” permanently eliminating the filibuster for Supreme Court nominees. That would leave Democrats with no leverage for the next high court vacancy, when the stakes presumably would be higher and the GOP unity needed to pull off the nuclear option might be absent.

That's exactly what happened. When faced with the higher stakes of replacing moderate Justice Anthony Kennedy (Gorsuch replaced another conservative, Justice Antonin Scalia), Democrats were left largely defenseless. They couldn't use the threat of a filibuster to encourage the selection of a less conservative nominee or an actual filibuster to try to defeat Kavanaugh, even though assault allegations and a narrower GOP margin might have precluded the nuclear option.

The only explanation for Democrats' seemingly self-destructive filibuster decision is that they were playing to their base. Instead of getting thanks from their base, Democrat senators got demands to fight tooth and nail against President Trump's second Supreme Court nominee, even though it was hard to envision a winning strategy.

With Republicans in control of the Senate, an all-out attack on Brett Kavanaugh made little sense because President Trump does not react to challenges by backing down. Had Kavanaugh been defeated, the president quickly would have selected a similarly conservative nominee – perhaps one more likely to vote to overturn Roe v. Wade – from the same list from which Kavanaugh was drawn. As I explained when the assault allegations surfaced:

"Even if Democrats … retake the Senate, the outgoing GOP majority would still have three months to confirm the new nominee. … [Democrats] will scream bloody murder about the legitimacy of confirmation by a lame duck Congress. But they also screamed bloody murder about the legitimacy of denying Supreme Court nominee Merrick Garland a hearing and look how far that got them."

The smart move for Senate Democrats would have been to assess which of the potential nominees on the president's list were least objectionable and trade input for less resistance. At very least, Democrats should have forgone a full-throated "war on women" attack on Kavanaugh, keeping their powder dry until the threat to Roe was real. Justice Kavanaugh, like Chief Justice Roberts, can hardly be counted on to support overturning Roe.

Instead, Democrats cried wolf about abortion and went all in on the sexual assault allegations, alienating swing GOP senators like Susan Collins of Maine, who will consequently be less likely to listen to concerns about a third Trump Supreme Court nominee. Once again, playing to the base precluded a smart strategy.

Perhaps it all would have been worth it if the all-out attack on Kavanaugh increased Democrats' electoral prospects. But that was never likely given that this is an issue that usually works in the GOP's favor (a decisive majority of 2016 voters who were focused on Supreme Court appointments voted for Trump), and this is a year when Republican rather than Democrat voters needed motivating. Sure enough, The Hill reports that "the partisan battle over Kavanaugh unified [the GOP] base beyond expectations."

We'll know more on Election Day. But with polls suggesting that the Kavanaugh battle in the Senate made a Democrat majority there less likely, it seems that Democrats failed to learn the right lessons from previous Supreme Court confirmation fights.