WASHINGTON — Judge Brett M. Kavanaugh sat in the anteroom of Room 216 in the Hart Senate Office Building, a sterile living-room-like space with a couch and a couple of arm chairs and a large television on the wall. His chances of joining the Supreme Court seemed to be vanishing. “Disaster,” read the text message from one Republican.
Christine Blasey Ford had just finished testifying that he had tried to force himself on her as a teenager, and nearly everyone in both camps found her credible, sincere and sympathetic. President Trump called Senator Mitch McConnell, the Republican leader, and they agreed she was impressive. “We’re only at halftime,” Mr. McConnell said, trying to be reassuring.
Mr. Trump thought it was time to bring in the F.B.I. to investigate, as many opponents of Judge Kavanaugh had urged, but when he called the Hart Building, Donald F. McGahn II, his White House counsel, refused to take the call. Instead, Mr. McGahn cleared the room and sat down with Judge Kavanaugh and his wife, Ashley Kavanaugh. The only way to save his nomination, Mr. McGahn said, was to show the senators how he really felt, to channel his outrage and indignation at the charges he had denied.
Judge Kavanaugh did not need convincing. He was brimming with rage and resentment, so when he went before the Senate Judiciary Committee, he did not hold back. His fire-and-fury performance — “you have replaced ‘advice and consent’ with search and destroy” — suddenly turned the tables. While Democrats thought he went too far, demoralized Republicans were emboldened again. In their war room, White House aides watching on television cheered and pumped their fists.
The 90-day battle to install Judge Kavanaugh on the Supreme Court that ended on Saturday with a razor-thin 50-to-48 vote proved to be the most dramatic confirmation fight in a quarter-century, a showdown of epic proportions that tested a president, drove a wedge through the Senate, gripped the nation, touched off emotional protests and exposed the dark corners of America’s struggle with sex and power.
At stake was nothing less than all three branches of government. In replacing Justice Anthony M. Kennedy, for years the Supreme Court’s swing vote, Judge Kavanaugh will almost surely move the high court to the right. A backlash among Democratic voters, however, may move Congress to the left in midterm elections just four weeks away. And Mr. Trump’s ability to legislate in the last two years of his term will depend on the outcome.
This account of the fight, assembled through interviews with White House officials, senators of both parties, staff members, lawyers and others involved, some of whom did not want to be identified describing private moments, showed that the nomination nearly unraveled at multiple junctures along the way.
At one point, a dubious Mr. Trump asked Mr. McConnell if Senate Republicans really were committed to seeing it through. Mr. McConnell said absolutely yes.
“I’m stronger than mule piss” on this guy, he answered.
But the Republican determination despite the charges left raw feelings that will not dissipate soon. “They are just blasting through one rule and one tradition after another,” said Senator Richard J. Durbin of Illinois, the Democratic whip. “If that does not change, it is going to be hard to repair the institutional damage here.”
Wariness of ‘a Bush Guy’
Mr. Trump was not especially enthusiastic about making Judge Kavanaugh his second Supreme Court nominee in the first place. The judge’s prior service as a White House aide to President George W. Bush made him suspect to Mr. Trump, who did not relish the idea of “a Bush guy” as his choice. Indeed, Mr. McConnell had warned against Judge Kavanaugh because of his paper trail, viewing other candidates as more easily confirmed.
Aides, led by Mr. McGahn, convinced Mr. Trump that Judge Kavanaugh would be the choice that would best suit the conservative movement, whose support has meant so much to the president. But they anticipated that this fight would be nastier, more brutal and more partisan than the one last year for Justice Neil M. Gorsuch because the direction of the court would be at stake.
As a result, aides told the president that he had to be fully invested in his selection and take a personal stake in his success. That was why even after the formal interview, they arranged for Mr. Trump to have a second meeting with Judge Kavanaugh, this one including their wives for nearly two hours in the White House residence the night before the announcement in July.
The White House set up a larger operation than it did for Justice Gorsuch, opening a war room on the fourth floor of the Eisenhower Executive Office Building with 11 lawyers and a couple of communications specialists aided by a team of attorneys at the Justice Department. They treated it as if it were a campaign, lining up more than 600 supportive statements and placing more than 200 op-ed pieces, not just in national newspapers but in those from key states like Maine, Arizona, Alaska and West Virginia. Outside groups on both sides aired millions of dollars in advertising.
Mr. McGahn, who is stepping down after this nomination, devoted much of his time to the battle, talking with Mr. McConnell nearly every day and calling another half dozen senators most days. He and his team decided early on to hitch their wagon to Mr. McConnell, at times intentionally walling themselves off from the president and White House.
They conducted more than a half-dozen mock hearings, including one that ran for more than 12 hours, to prepare Judge Kavanaugh for the real thing. The first set of hearings proved tough, as Democrats raised questions about his candor on everything from Roe v. Wade to stolen Democratic memos, but the nomination seemed on track.
The emergence of Dr. Ford late in the process, however, upended their plans. A psychology professor in California, Dr. Ford, 51, told The Washington Post that at a small party in the early 1980s, a drunken Mr. Kavanaugh pinned her to a bed, groped her, tried to remove her clothing and covered her mouth when she screamed.
When White House aides raised the issue with Judge Kavanaugh, he adamantly denied it and told them he did not even remember her. The situation grew worse a week later when The New Yorker published an interview with Deborah Ramirez, 53, a Yale University classmate who said he once exposed his genitals to her at a dormitory party. He denied that too.
At the White House, the mood was dark. For 24 hours, discouraged officials wondered whether the nomination was sunk. They were encouraged that The New York Times reported that it had interviewed several dozen people and could find no one with firsthand knowledge about the Yale incident and that Ms. Ramirez had told some classmates she could not be certain Judge Kavanaugh was the one who exposed himself.
Mr. Trump talked with Mr. McGahn and they agreed that Judge Kavanaugh had to personally confront the charges immediately before support eroded among Republicans. They did what has never been done in a Supreme Court confirmation and put him on television to be interviewed, choosing Mr. Trump’s favorite network, Fox News.
Judge Kavanaugh, joined by his wife, seemed flat and mechanical as he retreated to the same talking points denying the allegations. Mr. Trump, who styles himself a master of television, thought his nominee came across as weak. Getting the clip of him denying the charges into the media spin cycle was important but it was not enough.
Aides insisted that Mr. Trump never considered dumping Judge Kavanaugh. “This is a president that refuses to pull the rip cord and parachute down when the naysayers and critics tell him you can’t do it, that won’t work, it’s destined to failure,” said Kellyanne Conway, his counselor. “He’s determined to stick with Plan A. He never had a Plan B with Kavanaugh.”
Mr. McConnell said the issue of pulling Judge Kavanaugh came up but he was never concerned that Mr. Trump would withdraw the nomination. “No, we talked about it,” he said. “These issues are very controversial. We had numerous conversations about it through the course of time, but he hung in there.”
‘This Was a Turning Point’
The tide seemed to turn, oddly enough, when a third woman emerged with even more extreme allegations. Michael Avenatti, a brash and media savvy California lawyer who has been careening from one Trump administration brush fire to another, produced a statement from a woman alleging that Judge Kavanaugh in high school attended parties where women were gang raped. The woman, Julie Swetnick, said she was herself gang raped at one such party, though not by the judge.
Senator Charles E. Schumer of New York, the Democratic leader, rushed to the floor to insist that “Judge Kavanaugh should withdraw from consideration.”
Senator Susan Collins of Maine, a key swing Republican, was so troubled that she brought a copy of Ms. Swetnick’s statement, highlighted and marked up, to a meeting of Republican committee chairmen. Senator John Cornyn of Texas went through it point by point with her to debunk it.
The Republican senators got into a lengthy conversation about Mr. Avenatti and how he could not be trusted and concluded that Ms. Swetnick’s claims did not add up. Why would she as a college student repeatedly go to high school parties where young women were gang raped? No one came forward to corroborate the allegation and news reports surfaced about past lawsuits in which Ms. Swetnick’s truthfulness was questioned.
“This was a turning point,” said Senator Lindsey Graham, Republican of South Carolina. “That allegation was so over the top, it created a moment that was scary, quite frankly. But that moment was quickly replaced by disgust.”
The involvement of Mr. Avenatti, who represents Stephanie Clifford, the former porn star known as Stormy Daniels, particularly galvanized Republicans, reinforcing the idea that the allegations against Judge Kavanaugh were a political setup. One Republican congressional official called Mr. Avenatti’s involvement “manna from heaven.” From the other side, a Democratic congressional official called it “massively unhelpful.”
Mr. Durbin agreed that he “looked at it with a degree of skepticism,” but he said that the notion that Mr. Avenatti tipped the scale was “wishful thinking” by Republicans who were bent on confirming Judge Kavanaugh at all costs.
In an interview on Friday, Mr. Avenatti rejected the idea that his involvement was a factor. “It’s a bunch of nonsense that somehow I had anything to do with the end result here being negative,” he said. He credited Ms. Swetnick’s story with forcing Republicans to request an abbreviated F.B.I. investigation. “If it would have just been Dr. Ford, I don’t think the investigation takes place.”
Rallying the Republicans
The moment of maximum danger, that hour after Dr. Ford’s testimony on Sept. 27, sent a panic through Republican circles. Some in the White House and on Capitol Hill began privately speculating about when Judge Kavanaugh might withdraw. Dr. Ford appeared so human, so guileless, so believable that even Mr. Trump called her “very credible.”
But Judge Kavanaugh’s angry outburst rallied Republicans. He went so far in expressing rage that he blamed the allegations on plot to take “revenge on behalf of the Clintons” and he sharply challenged two of the Democratic senators about their own drinking. During a break, Mr. McGahn told him he had to dial it back and strike a calmer tone. When he returned to the committee room, Judge Kavanaugh moderated his anger and apologized to one of the senators.
When Mr. Durbin asked Judge Kavanaugh to turn around and ask Mr. McGahn to request an F.B.I. investigation into the charges against him, Mr. Graham erupted in a ferocious, finger-wagging lecture. Other Republican senators began channeling their inner Trump and lashing out on Judge Kavanaugh’s behalf as well.
Republican senators met that night just off the Capitol Rotunda. Ms. Collins said she would find it hard to vote yes without a sworn statement from Judge Kavanaugh’s friend, Mark Judge, denying that he saw what Dr. Blasey described. Aides to Senator Charles E. Grassley of Iowa, the Judiciary chairman, got a fresh statement from Mr. Judge within three hours to satisfy her.
Mr. Graham went to dinner that night at Cafe Berlin with Ms. Collins and two other undecided Republicans, Senators Jeff Flake of Arizona and Lisa Murkowski of Alaska. They discussed whether a limited F.B.I. investigation might assuage them.
The next morning, Mr. Flake announced that he would vote for Judge Kavanaugh in committee, only to change course after being confronted on an elevator by women who told him they were sexual assault victims. Ms. Collins and Ms. Murkowski were already talking by phone when Mr. Flake called them from a committee anteroom asking if they would back him in demanding a one-week F.B.I. inquiry.
Later that day, the three joined other Republican senators in Mr. McConnell’s office to discuss what the F.B.I. investigation should look like. The three undecided Republicans settled on four people they wanted to hear from: Ms. Ramirez, Mr. Judge and two others identified by Dr. Blasey as being elsewhere in the house at the time she was allegedly assaulted.
That list, however, later struck Democrats as so constrained that they demanded a more expansive investigation. In the end, the F.B.I. interviewed 10 people but not many others Democrats recommended.
The Final Decisions
Ms. Murkowski was struggling with what to do. She asked the committee staff to question Judge Kavanaugh’s friends about their understanding of terms from his yearbook like “boofing” and “Devil’s Triangle” to see if they matched his.
“It was hard reconciling my heart and my head this week,” she said later. “It has just been long. I haven’t gotten a lot of sleep. I haven’t eaten very well. I’m not a junk food person.”
Among those she and others heard from were Mr. Bush, who while no fan of Mr. Trump’s intervened nonetheless on behalf of his former aide, Judge Kavanaugh. The former president also called Mr. Flake and Ms. Collins, among other Republicans.
If Mr. Flake was moved by the protesters, though, other Republicans were not. Some like Mr. McConnell and Mr. Graham got their backs up.
“The tactics that were used completely backfired,” said Mr. McConnell. “Harassing members at their homes, crowding the halls with people acting horribly, the effort to humiliate us really helped me unify my conference. So I want to thank these clowns for all the help they provided.”
Less helpful may have been Mr. Trump’s decision to mock Dr. Blasey during a rally in Mississippi on Tuesday night, mimicking her telling senators she did not recall certain details about the alleged assault. Aides and senators had been urging him not to attack her directly for fear of alienating the very undecided senators he needed and, indeed, Mr. Flake, Ms. Murkowski and Ms. Collins all condemned his remarks. But White House aides insisted the president’s outburst fortified Republicans.
After the F.B.I. delivered results of its inquiry to the Senate, Ms. Collins and Ms. Murkowski holed up in the secure room on Thursday poring through the confidential material. Ms. Collins spent nearly five hours reading all of the interview summaries and reams of raw material from the F.B.I.’s tip line. Ms. Murkowski returned to the secure room as late as 10:30 at night to go through it again, after meeting earlier in the day with sexual assault survivors.
On Friday, the Senate gathered to take its procedural vote to move toward final confirmation. This was the moment of truth. Ms. Murkowski voted against Judge Kavanaugh, saying he was not the right man at this time for the Supreme Court. Mr. Flake voted yes.
Mr. McConnell and Mr. Cornyn were having lunch in the Senate Dining Room during a break when Ms. Collins came in. They invited her to join them and she disclosed that she too would vote yes on final confirmation. She later delivered a 45-minute floor speech explaining that the allegations simply were not corroborated.
Mr. Grassley, the committee chairman, was in tears and retreated to a cloakroom to collect himself. So were many others, but theirs were tears of anger and frustration, many of them women who thought their voices had not been heard.
The final vote came on an overcast Saturday afternoon. The suspense was gone but the emotion was not. Right after the final tally was read by Vice President Mike Pence, presiding in his role as president of the Senate, a woman yelled from the gallery: “This is a stain on American history. Do you understand that?”
One level down, off the floor of the Senate, Mr. McGahn and White House aides assembled in the vice president’s office. Aides to Mr. Grassley and Mr. McConnell gathered in the leader’s suite for a celebratory toast.
When Mr. Pence walked down the long marble steps toward his motorcade, hundreds of protesters, framed by the Supreme Court in the background, chanted, “Vote them out!”
Justice Kavanaugh will report to work in the building behind them on Monday, his fate settled but the battle still not settled at all.
Michael S. Schmidt contributed reporting from Washington, and Maggie Haberman and Jim Rutenberg from New York.
Follow Peter Baker and Nicholas Fandos on Twitter: @peterbakernyt @npfandos