WASHINGTON — Democrats don’t have the votes to block Supreme Court nominee Brett Kavanaugh. But that didn’t stop them from putting up a rowdy, leave-nothing-on-the-table fight during four days of Senate confirmation hearings that marked a new stage in the party’s resistance to President Donald Trump.

From the moment that the Senate Judiciary Committee chairman gaveled in the first session, the proceedings were tumultuous, disrupted first by Democratic senators objecting to the rules and then by protesters shouting “Sham president, sham vote” and other chants.

Sen. Chuck Grassley, an 84-year-old Iowa Republican, later said it was like nothing he had ever experienced during 15 Supreme Court confirmation hearings.

The bedlam is unlikely to change any votes in the Senate. The mathematical march toward Kavanaugh’s confirmation at month’s end remains the same in the Senate, where Republicans hold a 51-49 edge. Still, the battle may have changed the Democrats, who are being transformed by a new generation of politicians spoiling for a fight with Trump, even if it creates challenges for some Democratic candidates in the November election.

“Sometimes you just have to make a stand,” said Brian Fallon, a former top adviser to Hillary Clinton and the Senate’s top Democrat, New York’s Chuck Schumer. Fallon’s organization, Demand Justice, is leading the opposition to Kavanaugh.

“This vote is not going to age well,” Fallon said. He is holding out hope that not only will Democrats reject Kavanaugh, but that two pivotal Republicans, Sens. Lisa Murkowski of Alaska and Susan Collins of Maine, will join in to help stop the confirmation.

“Democrats should fight like hell,” he said.

Republicans have been eager to capitalize on the hearing, particularly as potential 2020 presidential hopefuls Sens. Kamala Harris of California and Cory Booker of New Jersey took turns aggressively questioning Kavanaugh in what many saw as a prelude to presidential campaigns.

Senate Majority Leader Mitch McConnell, R-Ky., portrayed the Democratic Party as dominated by “unhinged” protesters and aligned with liberals calling to abolish U.S. Immigration and Customs Enforcement. The second-ranking Republican, Sen. John Cornyn of Texas, bemoaned the “mob rule” at the hearings.

Trump took on his potential 2020 rivals directly. During campaign stops for GOP candidates challenging Senate Democrats this fall in Montana and North Dakota, states where Trump is popular, he ridiculed Democrats as “making fools out of themselves.”

“The way they’re screaming and shouting, it’s a disgrace to our country actually,” Trump said Friday during a fundraiser in Fargo, N.D., for the GOP opponent to Democratic Sen. Heidi Heitkamp.

Kavanaugh’s nomination carries political risks for both parties as they potentially alienate the large swath of independent voters who have big say in elections.

Democratic senators running for re-election in states where Trump is popular have the most to lose from the party’s Supreme Court fight.

Sens. Joe Donnelly in Indiana or Claire McCaskill in Missouri may benefit from a court battle that energizes the Democratic base. They need heavy voter turnout in metro Indianapolis and Kansas City, Democratic strongholds, if they have any hope of carrying otherwise red states that Trump won in 2016.

Yet the court fight might be unhelpful as some Democrats, including Heitkamp in North Dakota and Sen. Joe Manchin in West Virginia, try to appeal to moderate Republicans and independents.

Before the hearings began, Schumer gathered Democrats for a weekend conference call to plot strategy. They debated options, Schumer said, but decided on a strategy of staying in the room for questions, protest and disruption.

Gone are the niceties and overtures of an earlier era, when senators deferred to a president’s prerogative to put in place a qualified nominee of the commander in chief’s choosing.

Trump is a different kind of president, Democrats say, and the Senate a changed institution after President Barack Obama’s pick for the Supreme Court, Merrick Garland, was denied a hearing or vote.

Schumer, on Friday, seemed pleased with the result of the hard-edged approach. He said that Democrats “were able to shine a bright light — for the American people and Republican senators to see — on Judge Kavanaugh’s troubling views on women’s rights, presidential power, and protections for people with pre-existing conditions.”

“This was a good week.”