WASHINGTON (AP) — Mitch McConnell walked onto the Senate floor for the big vote to save Brett Kavanaugh’s nomination with a secret: He didn’t know how it would turn out.

It wasn’t supposed to be like this. The Senate majority leader is often seen as a masterful tactician. But he was watching and waiting like the rest of the nation to see if his Republican senators would advance President Donald Trump’s pick for the Supreme Court. Without that vote on Friday, there would be no triumphant final roll call on Saturday.

Kavanaugh’s confirmation was always going to be difficult, but over the past few weeks it had veered terribly off course. Three women had accused the judge of sexual misconduct, bringing a #MeToo reckoning to Capitol Hill and transforming the nomination fight into a bitter dispute that pushed the polarization of the Senate to new extremes.

This account of how Republicans brought Kavanaugh back from the brink is based on roughly a dozen interviews with administration officials, senators, aides and others. Some asked for anonymity because they were not authorized to reveal details about private discussions.

The rescue campaign was as bold as the Democratic effort to stop Kavanaugh. It included long-distance arm twisting from a former president, a locker room-style pep talk that helped change the game and decisions made up to the last minute.

___

THE LOW POINT

The White House was near crisis mode, its lowest point, with dire calls flooding in about whether the president was going to pull the nomination. Republicans had just secured a deal with Christine Blasey Ford’s lawyers on ground rules for her testimony to the Judiciary Committee about her allegation that Kavanaugh assaulted her when they were teens. And now a new accuser, Deborah Ramirez, had come forward to claim Kavanaugh exposed himself to her when they were freshmen at Yale.

Republicans knew the hell that would befall them if they bailed out. But this was a moment when Trump’s ability to shape events was limited.

Jeff Flake, the Arizona Republican, was publicly wavering on Kavanaugh. And his party badly needed him back in the fold.

Flake had been central to the effort to slow voting and allow Ford a chance to testify. And Republican Sen. Susan Collins had been in constant contact with him. With Lisa Murkowski of Alaska, the trio had forced GOP leaders to give Ford a chance to tell her story.

Another Republican, Utah’s Sen. Mike Lee, gave Flake a call. The two had grown close on long flights to Washington and have a lot in common, including their Mormon faith.

But the president himself has never had much influence over the three senators. They are the most independent Republicans in the chamber, and Flake had been forced into early retirement for his criticism of Trump. With Trump on the sideline, White House Counsel Don McGahn became the White House’s liaison to the trio.

McGahn had talked to McConnell, the president and others, saying they had to come up with something to change the dynamic. From the well-staffed war room for the nomination on the White House campus and beyond, the consensus answer was simple: Kavanaugh had to tell his side of the story. He would do an interview on Fox News.

“We’re basically in a political campaign here,” said Scott Jennings, a longtime McConnell political consultant. “We have two candidates — the accuser and the accused.”

___

WHO IS THE REAL KAVANAUGH?

It was a painful interview, full of repetitive talking points and Kavanaugh’s sidelong glances at his wife.

The most memorable moment? Perhaps the 53 year-old judge giving a rambling account of his youthful virginity.

The performance rattled some in the West Wing, including the president, who told allies he was frustrated and concerned about how the judge would hold up before the Judiciary Committee.

The No. 2 Republican, Sen. John Cornyn of Texas, acknowledged “it’s extremely awkward to be talking about such private matters on TV.”

But some in the White House saw it as “game changing” play that served its purpose in denying the accusation and providing a video that could be played over and over again. It also hit a key demographic audience of slightly older Republican-leaning women whose views would be important come November.

Now Kavanaugh had to show the senators themselves — and the public — his human side. Not the Yale-educated judge, but the fire in the belly. He would soon have that opportunity at the Judiciary Committee hearing with Ford.

Her testimony came first, and it captivated the nation. Had the hearing ended there, some senators said, Kavanagh might not have had a chance. Trump called McConnell, concerned.

But McGahn cleared the side room where Kavanaugh was waiting with his wife. He told the judge this was no longer about judicial philosophy. He needed to be authentic. It was his time to speak, in his own words.

Kavanaugh got the message. He walked to the witness table, adjusted his nameplate and — alternating between angry outbursts and stifled sobs — told the committee he was innocent. He didn’t do the things the accusers said he did. And he was not going to let this destroy his life.

He’s crushing it, texted one staffer to another.

It was risky strategy that created a partisan Rorschach test. Democrats saw Kavanaugh as unhinged, hysterical, trafficking in Clinton conspiracy theory. Republicans were thrilled, seeing a counterpunch from a qualified nominee unjustly accused.

Trump called McConnell again, this time pleased. “Judge Kavanaugh showed America exactly why I nominated him,” Trump tweeted. “His testimony was powerful, honest, and riveting.”

But what the senators saw was something else. Collins, watching from her Capitol hide-a-way, had more questions. And for Murkowski, it was the moment that would begin to change her mind — against the nominee.

___

THE ANTEROOM

The phone rang the next day in the anteroom off the Judiciary Committee.

It was George W. Bush on the line.

The former president had been a big backer of Kavanaugh, the young lawyer who had worked for him as counsel and staff secretary at the White House. Bush was calling Flake, who had abruptly brought the hearing to a standstill.

They were supposed to be voting to send Kavanaugh’s nomination to the full Senate, but Flake was considering a delay to allow for an FBI investigation into the allegations of misconduct.

McConnell knew another delay could prove deadly. Tips were flying in to senators’ office, some of them anonymously, and Kavanaugh had been forced onto multiple calls with committee investigators to deny them.

The leader gathered Flake, Murkowski, Collins and others in his office. With his slim 51-49 seat majority, he had no choice but to meet the needs of the wavering Republicans. The plan was set for a one-week FBI investigation.

Then the days dragged on awaiting the agency’s report. One White House aide said it felt like the final days of a presidential campaign.

___

THE VOTE

The White House view was that fellow senators would be more effective than Trump at persuading the wayward Republicans, and “buddies” were assigned to each of the swing votes to keep checking in with them.

And really, who could persuade Collins, Murkowski or Jeff Flake?

Collins is known for thinking long and hard about issues. Murkowski is as independent as her far-flung state of Alaska, after having won a write-in campaign for re-election that made her seem politically invincible. Flake is a loner of sorts who keeps his own counsel.

When the confidential FBI report arrived in the secure room on Capitol Hill, the three went together for a briefing.

Collins went back for a second read of the report. Flake stayed for three hours digging in. Lee was often by his side.

McConnell kept pushing forward, scheduling the vote for Friday to move forward on Kavanaugh even though he didn’t have the support locked in. He’s usually not one to bluff. But after having declared days earlier, “I’m confident we’re going to win,” he was more subdued the morning of the vote.

Collins tipped her hand, telling reporters on her way to the chamber she was a “yes.” Flake said in a statement he was ready to confirm Kavanaugh. But Murkowski whispered “no” when the clerk called her name.

From his West Wing office, Vice President Mike Pence watched the proceedings on television, poised to step in and break a tie, if needed. Pence’s staff began preparing the motorcade for him to travel to the Capitol.

But with no other Republican defecting, the vote had succeeded.

Flake left the Senate chamber without saying much. Collins later delivered a floor speech that was praised as required reading as she catalogued her reasoning and bemoaned a process that she said looked like a “caricature of a gutter-level political campaign.”

Murkowski delivered her own speech, saying that Kavanaugh’s testimony convinced her he didn’t have the temperament or the impartiality for the job.

The senators were tired. The Capitol cleared out, except for a few Democrats who kept up the argument all night.

Then came Saturday’s roll call. Dramatic and anticlimactic at the same time. McGahn, the White House counsel who’d given the nominee the Thursday pep talk, was in the front row of the gallery.

It was 50-48. The Kavanaugh campaign had won.

(Copyright (c) 2020 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)