The US Senate has voted to confirm Brett Kavanaugh to the Supreme Court, bringing to an end a weeks-long fight over whether women’s sexual misconduct allegations against him were credible and mattered.

The vote would have been 51-49, but Murkowski, whose vote will be recorded as “no,” agreed to vote “present” in a paired vote with Steve Daines, taking the final tally to 50-48.

Their vote, which was paired because Daines could not attend, maintains the same two-vote margin and does not change the outcome.

Hundreds of protesters opposed the vote in the gallery.

Kavanaugh’s fate ultimately came down to four senators who were undecided on how they would vote until the very end: Republicans Susan Collins, Jeff Flake and Murkowski, and Democrat Manchin.

US President Donald Trump congratulated his nominee, posting on Twitter: “I applaud and congratulate the U.S. Senate for confirming our GREAT NOMINEE, Judge Brett Kavanaugh, to the United States Supreme Court.

“Later today, I will sign his Commission of Appointment, and he will be officially sworn in. Very exciting!”

I applaud and congratulate the U.S. Senate for confirming our GREAT NOMINEE, Judge Brett Kavanaugh, to the United States Supreme Court. Later today, I will sign his Commission of Appointment, and he will be officially sworn in. Very exciting!

Democrats had never been particularly happy with Kavanaugh, who was a judge on the D.C. Circuit Court of Appeals. They raised concerns about his judicial philosophy and how he would rule on abortion and health care issues.

But his nomination blew up completely last month when Dr. Christine Blasey Ford, a California professor, publicly came forward with allegations that Kavanaugh tried to rape her in high school.

Millions of people watched as Ford testified before the Senate Judiciary Committee, describing a 1982 party where a drunk Kavanaugh and his friend, Mark Judge, allegedly pushed her into a room, pinned her down, groped her and covered her mouth when she tried to scream. Her testimony took place as two morewomen came forward with sexual misconduct allegations against him.

Yet none of that was enough to sway Republicans to oppose Kavanaugh. Some argued that Ford’s contemporaries couldn’t corroborate her story, despite Ford securing affidavits from four people who said she previously told them about Kavanaugh’s alleged attack. Others said they believed Ford was sexually assaulted by someone, but that it couldn’t have been Kavanaugh.

None of them could answer the question at the heart of their decision to support Kavanaugh: whether they believe Ford is lying, or whether they believe she is telling the truth but that her allegations don’t matter for judging the character of a nominee to a lifetime seat on the Supreme Court.

Meanwhile, Republicans raged against the other women’s accusations. One woman said that in high school, Kavanaugh attended parties where groups of boys would rape girls (though she didn’t say she’d witnessed Kavanaugh himself committing rape). To Republicans ― especially Senator Lindsey Graham ― this was a straightforward “gang rape” accusation, one so obviously ridiculous that it became a rallying cry.

Ahead of a procedural vote on Friday, Senate Majority Leader Mitch McConnell framed the confirmation fight not only as a battle over the Supreme Court, but as a test of whether the Senate should believe allegations against a nominee that don’t come with firm corroboration.

That, McConnell said, is the statement the Senate will make with its Kavanaugh vote.

“We will either state that partisan politics can override the presumption of innocence, or we will reaffirm that, in the United States of America, everyone is innocent until proven guilty,” he said.

Kavanaugh’s confirmation flies in the face of the cultural and political Me Too movement, which has empowered women in all walks of life to speak out about sexual assault and harassment, especially by men in positions of power. The movement began partly in response to the election of President Donald Trump, who has bragged on tape about sexual assault and been publicly accused of assault or misconduct by more than 20 women.

Collins said Friday that she was confident that Kavanaugh will not overturn Roe v. Wade, the landmark Supreme Court decision that legalised abortion in the U.S. She also said that she believes Ford, but thinks somebody else besides Kavanaugh must have been the perpetrator. This is despite Ford testifying, under oath, that she is “100 percent” sure that Kavanaugh was her attacker.

“We must listen to survivors,” Collins declared Friday in a sweeping Senate floor speech about doing the right thing, moments before pledging to vote for Kavanaugh. “The Me Too movement is real, it matters, it is needed, and it is long overdue.”