The 2020 presidential campaign came roaring into Judge Brett M. Kavanaugh’s confirmation hearings this week, with a pair of prospective Democratic candidates going to extraordinary lengths to demonstrate their opposition to President Trump’s Supreme Court nominee.

Sen. Cory Booker (N.J.) on Thursday portrayed himself as a rebel willing to face expulsion from the Senate for releasing confidential documents from Kavanaugh, describing it as his “I am Spartacus” moment. In reality, the documents had already been cleared for release.

Sen. Kamala D. Harris (Calif.) hinted that she might have hard evidence that Kavanaugh spoke about the special counsel investigation with someone at the law firm founded by Trump’s personal attorney. But she offered no such details when pressed.

Booker and Harris, two of the Democratic Party’s most prominent African Americans, took the headline-grabbing but shaky steps to put their opposition to Trump and Kavanaugh on full display for the country.

The jockeying by the two came amid a clamor by a liberal base demanding resistance to Trump’s agenda and nominees at all costs and under a glaring national spotlight exposing every stumble. At the same time, the bare-knuckle brawling has divided Democrats, frustrating moderates facing tough reelection bids in states Trump won handily.

“It’s not who I am,” said Sen. Joe Manchin III (D-W.Va.), who observed the questioning by Democrats and Republicans at the Senate Judiciary Committee hearing and has indicated he is open to voting for Kavanaugh.

The presidential ambitions of several Senate Democrats could cost the party in November’s midterm elections, with 10 Democrats fighting for reelection in states won by Trump.

Republicans seized on Booker’s actions, with Sen. John Cornyn (Tex.) accusing him of making “himself a martyr in aid of his presidential campaign” and the GOP mocking him as the “Spartacus of Newark.” In July, Republicans pounced on Booker’s statement that supporters of Kavanaugh are “complicit” in “evil.”

Despite the actions of Booker, Harris and dozens of protesters who have repeatedly disrupted the hearings, Democratic hopes of defeating Kavanaugh have all but faded completely. Activists have so far failed to convince pivotal centrist senators to oppose him and encountered difficulties around the country in motivating people to pressure them.

As a result, Kavanaugh is in strong position to be confirmed later this month as Republicans hold a 51-49 advantage. In fact, while committee Democrats were challenging Kavanaugh, the Senate confirmed eight district judges on Thursday, giving Trump 41 since he took office plus 26 appellate judges and Supreme Court Justice Neil M. Gorsuch.

But for Booker and Harris, the fight for 2020 is just beginning. Both are experiencing their first Supreme Court nomination hearings as members of the Judiciary Committee.

“Clearly, if I’ve already been threatened with expulsion, I’m willing to go into every means,” Booker told reporters on Thursday, wearing the Republican hostility as a badge of honor.

The fireworks that erupted Wednesday night when Booker and Harris first grilled Kavanaugh lit up the cavernous hearing room again when the Judiciary Committee resumed business Thursday morning.

Booker lambasted the panel’s procedure of keeping many Kavanaugh documents private as a “sham” with little merit and said he was releasing some, despite the dire consequences he could face for doing so. “Bring it on!” he said.

Cornyn, the second-ranking Republican senator and a fellow member of the Judiciary panel, accused Booker during the hearing of prioritizing his national ambitions. “Running for president is no excuse for violating the rules of the Senate or of the confidentiality of the documents that we are privy to,” he said.

But the records that Booker posted on his website Thursday morning had already been cleared for public release, according to Democratic and Republican aides on the committee.

Pressed by reporters about whether he was told the documents that he mentioned Thursday morning were approved for release, Booker said he read in Wednesday’s session from “committee confidential documents in violation of the rule.” He said he was continuing to release confidential documents and did so during the day.

Senate Majority Leader Mitch McConnell (R-Ky.) said in a Friday interview with radio host Hugh Hewitt that Booker could face scrutiny from the Senate Ethics Committee.

On Wednesday, Booker cited an email Kavanaugh had written that touched on the issue of race and pressed him to clarify his position on government efforts to promote diversity. Sitting next to Harris on the dais, Booker spoke frequently during his exchange with Kavanaugh, often overshadowing the judge’s comments with his own. At one point, Booker mentioned voting rights in South Carolina, a crucial early primary state.

“This Kavanaugh nomination is of paramount importance,” said Scott Brennan, a Democratic National Committee member from Iowa. “Those who acquit themselves well as part of that can enhance their credibility.”

Harris’s tense exchange late Wednesday with Kavanaugh centered on special counsel Robert S. Mueller III’s probe into Russian interference in the 2016 presidential election and possible links to the Trump campaign. A C-SPAN video posted of the nearly eight-minute back and forth on Twitter Wednesday evening was viewed nearly 4.8 million times by early Thursday afternoon.

Harris repeatedly asked Kavanaugh whether he talked about Mueller or his probe with anyone at the law firm founded by Trump’s personal lawyer, Marc Kasowitz.

Kavanaugh said he didn’t remember and wasn’t sure he knew everyone who works at the law firm. On Thursday, Harris asked him once more, saying this time that she had received “reliable information” that he had had such a conversation. “I’m not asking you, ‘What did you say.’ I’m asking, ‘Were you party to a conversation’” about the Mueller inquiry. Kavanaugh said no.

A spokesman for law firm Kasowitz Benson Torres said in a statement that “no discussions” regarding the probe had occurred “between Judge Kavanaugh and anyone at our firm.”

Under questioning earlier on Thursday, Kavanaugh said he knew Ed McNally, who used to work at the White House Counsel’s Office and is now at the firm. Kavanaugh said he had not discussed the special counsel’s probe with McNally, and the law firm said in a statement that McNally did not help Kavanaugh for his confirmation hearings and “has not discussed with Judge Kavanaugh ‘the Mueller probe or answers he might get related to the legal questions raised by the probe.’”

Democratic senators have felt intense pressure from activists to vigorously fight Kavanaugh’s nomination. Sen. Dianne Feinstein (Calif.), the top Democrat on the Judiciary Committee, apologized to Kavanaugh for the protesters in the room this week. That prompted criticism from Brian Fallon, the head of an anti-Kavanaugh group, Demand Justice, who called it “ridiculous.”

Separately, a collection of liberal groups sent Senate Minority Leader Charles E. Schumer (D-N.Y.) a letter chastising him for not pressuring all Democratic senators to oppose Kavanaugh. “The Supreme Court is on the line, and you are failing us,” they wrote.

Sen. Amy Klobuchar (D-Minn.), another possible White House contender who sits on the Judiciary Committee, has questioned Kavanaugh on issues that have resonated with party activists, including presidential power and health care.

The blunt questions Democrats have asked Kavanaugh on the most explosive political, cultural and legal battles of Trump’s tenure highlight the emerging themes of the campaign, which could be one of the most wide open and crowded in recent memory.

Beyond the Judiciary Committee, other potential presidential candidates in the Senate have spoken out sharply against Kavanaugh this week.

Sen. Elizabeth Warren (D-Mass.) has been tweeting with the hashtag “#StopKavanaugh.” In one tweet, she included a video listing five reasons to vote against him.

“This is a wake-up call for all of us and for the country,” said Sen. Kirsten Gillibrand (D-N.Y.), speaking of Kavanaugh’s nomination. Gillibrand said she would “of course” vote against Kavanaugh and urged people to pressure other senators to do the same.

Several of the potential White House candidates sent emails to supporters about their opposition to Kavanaugh this week, urging them to sign a petition and provide their contact information or donate money.

As for Booker and Harris, Judiciary Committee Chairman Charles E. Grassley (R-Iowa) told reporters he was fine with their line of questions — for the most part.

“It may be nice if they would have stopped at the end of their time limit,” he said.

Seung Min Kim contributed to this report.