WASHINGTON — The fight is over. Can the Supreme Court recover?

If there's one thing that Republicans and Democrats agreed on Saturday, it was that after the rancor over Judge Brett Kavanaugh's nomination, the court was in danger of being tainted, and diminished, by the divisive political fight.

The raw anger for many on the left was apparent as Senate Republicans and one Democrat cast the votes Saturday afternoon that confirmed Kavanaugh to the Supreme Court, 50-48, establishing a firm conservative majority. He was quickly sworn in, completing a major victory for President Trump and Republicans just weeks ahead of crucial midterm elections.

"This is a stain on American history!" one woman in the Senate gallery shouted as the vote ended. "Do you understand?"

Others screamed that they were survivors of sexual assault as security hauled them from the chamber, and the voting moved on.

Each party cast blame the other way — as they have in escalating bouts of acrimony over the courts for decades.

"It is so critical that we have that public confidence in at least one of our three branches of government," Sen. Lisa Murkowski (R., Alaska) said on the Senate floor Friday night, as she explained why she was the sole Republican to oppose Kavanaugh's nomination.

She recoiled at the entire process, but pointed in particular to Kavanaugh's biting testimony as he denied accusations of sexual assault, raising fears that his confirmation could undermine faith in his impartiality as a justice.

On Saturday, Sen. Dick Durbin (D., Ill.) said on the Senate floor: "Filling this critical … vacancy with Justice Kavanaugh will again raise the question about Supreme Court politics. Chief Justice Roberts — are you watching?"

And Rep. Jerrold Nadler (D., N.Y.), in line to lead the House Judiciary Committee if Democrats win a majority in November's elections, told the New York Times that he would launch an investigation into the sexual-misconduct claims against Kavanaugh, and into whether the judge gave false testimony under oath.

Republicans, in turn, accused Democrats of besmirching the nomination process with "character assassination," in the words of Sen. Charles Grassley (R., Iowa).

Sen. Susan Collins (R., Maine), who effectively sealed Kavanaugh's ascension with her support for the judge, said in her floor speech: "Our Supreme Court confirmation process has been in steady decline for more than 30 years. One can only hope that the Kavanaugh nomination is where the process has finally hit rock bottom."

It seems unlikely.

Kavanaugh's two-vote margin for confirmation was the narrowest for any judge to reach the court since 1881, when the Senate approved President James Garfield's nominee, Stanley Matthews, 24-23.

Yet Kavanaugh will have an outsized influence, replacing a swing vote, the retired Justice Anthony M. Kennedy, with someone who is likely to be a reliable conservative.

In contrast, the conservative Chief Justice John G. Roberts Jr., nominated by Republican President George W. Bush, won 78 confirmation votes in 2005 and Justice Sonia Sotomayor, nominated by Democratic President Barack Obama, received 68 votes in 2009. Each won at least nine votes from the opposite party.

Kavanaugh received one, from West Virginia's Joe Manchin.

Sen. Chris Coons (D., Del.) lamented that such an important vote would come from such a divisive process, with little buy-in from the minority party.

"I've spoken with a couple of my colleagues about how different a time this is from a period when either a Justice [Elena] Kagan or a Justice [Antonin] Scalia could be confirmed by an overwhelming bipartisan" vote, he said.

Kagan, nominated by Obama, worried about perceptions of the court during an appearance at Princeton University on Friday.

"It's an incredibly important thing for the court to guard this reputation of being impartial, being neutral, and not being simply an extension of a terribly polarizing process," she said. "This is a really divided time, and part of the court's strength and part of the court's legitimacy depends on people not seeing the court in the way that people see the rest of the governing structures of this country."

In theory, the court is the one branch of the federal government that is supposed to be apolitical, or at least less political. Its authority depends on public acceptance of its rulings' validity, since it has no formal way to enforce its decisions.

But a sweeping 2014 historical study of decisions with at least two dissents by professors from William & Mary Law School and Ohio State University found that the justices are voting more in line with the party of the president who appointed them than ever before.

"This is the first period in which the Court has been sharply divided between substantial blocs of Justices from each of the two major political parties," they wrote.

Public polling by Gallup found that confidence in the court has plunged, from around 50 percent of American adults in the late 1990s and early 2000s to 37 percent now. That's still better than, say, Congress, but mirrors the declining faith in most major institutions.

Protests Saturday showed the searing anger that will trail Kavanaugh and, for some, cast doubt over critical rulings.

Several women interrupted the vote count inside the Senate chamber, screaming that they were victims of sexual assault and would not "consent." Hundreds of protesters gathered at the Supreme Court and on the Capitol steps. One woman scrawled a single word in bright red letters on her forearm: fury.

Erin Whitney, a behavioral counselor from outside Houston, carried a sign that read "Checks and balances are disappearing before our very eyes."

"This is the fear that all of us have," she said in an interview. "It's one thing if we live in a country where there are checks and balances for those of us who have a softer, a less powerful voice … but if there are no checks and balances, that puts us in a very dangerous position."

Kavanaugh's critics argued that his confirmation hearing will politicize the court in unprecedented ways. After being accused by a professor, Christine Blasey Ford, of attempted rape while in high school — a charge he angrily denied — Kavanaugh attacked Democrats and accused them of seeking "revenge for the Clintons."

And while presidential nominees almost never interact with the media during their confirmations, Kavanaugh turned to conservative-leaning news outlets, Fox News and the Wall Street Journal, to try to bolster his nomination, heightening the parallels with a political campaign.

Republicans said Kavanaugh's emotional response was that of an honest man falsely accused. They instead said the process was degraded by a Democratic smear campaign to keep him off the court with uncorroborated allegations.

"As this confirmation process concludes, my sincere hope is that all of my colleagues will seek to do the important work of restoring trust and civility in politics," Sen. Pat Toomey (R., Pa.) said in a statement. "The advice and consent role of the Senate for nominees would be a good place to start."

The Kavanaugh debate was the latest in long-running acrimony over the courts.

Democrats are still seething over Republicans' refusal to hold even a hearing on Judge Merrick Garland, nominated by Obama in 2016. And they railed that the GOP brushed past the sexual-assault accusation brought by Ford with only a cursory investigation.

Republicans point back to Democrats' sinking of the Robert Bork nomination in 1987 and, more recently, their move in 2013 to lower the threshold for ending debate and advancing lower-court nominees to 50 votes, overriding the then-minority GOP.

After Republicans decried that move, they returned the favor last year by using their power to also lower the bar for advancing Supreme Court justices to 50 votes, instead of 60.

That enabled them to confirm Kavanaugh with the narrowest of margins.