This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

WASHINGTON — The bitterly polarized U.S. Senate narrowly confirmed Brett Kavanaugh on Saturday to join the Supreme Court, delivering an election-season triumph to President Donald Trump that could swing the court rightward for a generation after a battle that rubbed raw the country’s cultural, gender and political divides.

The near party-line vote was 50-48, capping a fight that seized the national conversation after claims emerged that Kavanaugh had sexually assaulted women three decades ago — which he emphatically denied.

Those claims magnified the clash from a routine Supreme Court struggle over judicial ideology into an angrier, more complex jumble of questions about victims’ rights, the presumption of innocence and personal attacks on nominees.

Acrimonious to the end, the battle featured a climactic roll call that was interrupted several times by protesters in the Senate Gallery before Capitol Police removed them.

Later Saturday, Kavanaugh was sworn in as the 114th Supreme Court justice during a private ceremony at the court.

The vote gave Trump his second appointee to the court, tilting it further to the right and pleasing conservative voters who might have revolted against GOP leaders had Kavanaugh’s nomination flopped.

Democrats hope that the roll call, exactly a month from elections in which House and Senate control are in play, will prompt infuriated women and liberals to stream to the polls to oust Republicans.

In final remarks just before the voting, Senate Republican leader Mitch McConnell of Kentucky said a vote for Kavanaugh was “a vote to end this brief, dark chapter in the Senate’s history and turn the page toward a brighter tomorrow.”

Democratic leader Chuck Schumer of New York looked ahead to November, appealing to voters beyond the Senate chamber: “Change must come from where change in America always begins: The ballot box.”

Rep. Joe Manchin of West Virginia, confronting a tough re-election race next month in a state that Trump won in 2016 by a landslide, was the sole Democrat to vote for Kavanaugh. Every voting Republican backed the 53-year-old conservative judge.

Alaska’s Lisa Murkowski, the only Republican to oppose the nominee, voted “present,” offsetting the absence of Kavanaugh supporter Steve Daines of Montana, who was attending his daughter’s wedding.

That rare procedural maneuver left Kavanaugh with the same two-vote margin he’d have had if Murkowski and Daines had both voted.

It was the closest roll call to confirm a justice since 1881, when Stanley Matthews was approved by 24-23, according to Senate records.

Murkowski said Friday that Kavanaugh was “a good man” but his “appearance of impropriety has become unavoidable.” Republicans hold only a 51-49 Senate majority and therefore had little support to spare.

The outcome, telegraphed Friday when the final undeclared senators revealed their views, was devoid of the shocks that had come almost daily since Christine Blasey Ford said last month that an inebriated Kavanaugh tried to rape her at a 1982 high school get-together.

Since then, the country watched agape at electric moments.

These included the emergence of two other accusers; an unforgettable Senate Judiciary Committee hearing at which a composed Ford and a seething Kavanaugh told their diametrically opposed stories, and a truncated FBI investigation that the agency said showed no corroborating evidence and Democrats lambasted as a White House-shackled farce.

All the while, crowds of demonstrators — mostly Kavanaugh opponents — ricocheted around the Capitol’s grounds and hallways, raising tensions, chanting slogans, interrupting lawmakers’ debates, confronting senators and often getting arrested.

Trump weighed in Saturday morning on behalf of the man he nominated in July. “Big day for America!” he tweeted.

Democrats said Kavanaugh would push the court too far, including possible sympathetic rulings for Trump should the president encounter legal problems from the special counsel’s investigations into Russian connections with his 2016 presidential campaign.

And they said Kavanaugh’s record and fuming testimony at a now-famous Senate Judiciary Committee hearing showed he lacked the fairness, temperament and even honesty to become a justice.

But the fight was defined by the sexual assault accusations. And it was fought against the backdrop of the #MeToo movement and Trump’s unyielding support of his nominee and occasional mocking of Kavanaugh’s accusers.

About 100 anti-Kavanaugh protesters climbed the Capitol’s East Steps as the vote approached, pumping fists and waving signs. U.S. Capitol Police began arresting some of them.

Hundreds of other demonstrators watched from behind barricades. Protesters have roamed Capitol Hill corridors and grounds daily, chanting, “November is coming,” ”Vote them out” and “We believe survivors.”

On Friday, in the moment that made clear Kavanaugh would prevail, Collins delivered a speech saying that Ford’s Judiciary Committee telling of the alleged 1982 assault was “sincere, painful and compelling.” But she also said the FBI had found no corroborating evidence from witnesses whose names Ford had provided.

“We must always remember that it is when passions are most inflamed that fairness is most in jeopardy,” said Collins, perhaps the chamber’s most moderate Republican.

Manchin used an emailed statement to announce his support for Kavanaugh moments after Collins finished talking. Manchin, the only Democrat supporting the nominee, faces a competitive re-election race next month in a state Trump carried in 2016 by 42 percentage points.

Manchin expressed empathy for sexual assault victims. But he said that after factoring in the FBI report, “I have found Judge Kavanaugh to be a qualified jurist who will follow the Constitution.”