WASHINGTON ― The Senate confirmed Judge Neil Gorsuch to the Supreme Court on Friday, ending an ugly, weeks-long fight between Democrats who demanded a different nominee and Republicans who changed the rules to go around them entirely.

Gorsuch was confirmed, 54 to 45. Sens. Joe Manchin (D-W.Va.), Heidi Heitkamp (D-N.D.) and Joe Donnelly (D-Ind.) were the only Democrats who voted with Republicans to support President Donald Trump’s court pick. Sen. Johnny Isakson (R-Ga.) missed the vote.

Following the vote, the Supreme Court announced that Gorsuch would be sworn in by Chief Justice John Roberts as the nation’s 101st associate justice in a private ceremony on Monday. Justice Anthony Kennedy, for whom Gorsuch clerked as a young lawyer, will administer a public oath later at the White House.

Republican leaders were thrilled to chalk up the win, arguably their party’s first major victory since Trump became president.

“He’s going to make an incredible addition to the court,” Senate Majority Leader Mitch McConnell (R-Ky.) raved ahead of the vote.

In a statement, Trump called Gorsuch’s confirmation process “one of the most transparent and accessible in history.”

“As a deep believer in the rule of law, Judge Gorsuch will serve the American people with distinction as he continues to faithfully and vigorously defend our Constitution,” he said. At 49, Gorsuch’s lifetime appointment to the bench is expected to last decades.

Democrats had argued that Gorsuch, a conservative Colorado federal appeals judge, was out of the mainstream and too aligned with corporate interests to be a fair justice. They urged Republicans to put forward a consensus nominee. When that didn’t happen, they made history on Thursday by staging a party-line filibuster of the Supreme Court nominee.

Republicans retaliated by making history, too: They unilaterally blew up the rules so it only takes 51 votes, instead of 60, to advance any Supreme Court nominee. There are 52 Republicans, so after that rules change, they had the votes to bypass Democrats and move Gorsuch along.

The rules change means that majority parties will no longer have to concern themselves, at all, with the opinions or votes of minority party members for any presidential appointments.

Senators in both parties are walking away from this fight with a bitter taste in their mouths.

“I could not help but notice a number of my colleagues on the other side of the aisle high-fiving each other,” Sen. Richard Blumenthal (D-Conn.) said on Thursday after the rules change. “That image stays with me as I stand here now. It saddens me. There is no cause for celebration in what happened in the Senate just hours ago. No one should sleep well tonight. No one should underestimate the magnitude of what happened here.”

“I wish that an important aspect to this process had played out differently. It didn’t have to be this way,” McConnell said on Friday. “But today is a new day. I hope my Democratic friends will take this moment to reflect on perhaps considering a turning point in their outlook going forward.”

Gorsuch will fill the seat on the court previously held by conservative Justice Antonin Scalia, who died in February 2016. President Barack Obama put forward a nominee, Merrick Garland, to fill that seat in March 2016. But McConnell took the unprecedented step of refusing to give him a hearing ― never mind a vote ― for the entire year, arguing that the next president should get to fill the court vacancy. He took that position literally an hour after news of Scalia’s death broke.

Tom Williams/CQ Roll Call Mitch McConnell gives a thumbs-up after changing the Senate rules to force through President Donald Trump's Supreme Court nominee, Neil Gorsuch.

Democrats’ anger over Garland’s mistreatment spilled over into the fight over Gorsuch. They watched as Republicans made the case for why Gorsuch deserved a vote by using the exact same arguments Democrats made all last year for why Garland deserved a vote.

“Judge Neil Gorsuch has spent more than a decade on the federal bench. He graduated from Harvard Law School, clerked for the Supreme Court, served in the Department of Justice and has received a unanimous ‘well qualified’ rating from the American Bar Association,” Sen. Patrick Leahy (D-Vt.) said during a Judiciary Committee hearing last month. “If all of those things were sufficient reason to confirm a nominee to the Supreme Court, Chief Judge Merrick Garland would be sitting on the court today.”

The partisan mudslinging is certain to affect the public’s perception of the Supreme Court, which will now return to its full lineup of justices and perhaps begin taking up some of the controversial cases it’s avoided while Scalia’s seat was unfilled.

Some of the politically charged cases expected to reach the court soon involve North Carolina’s controversial voter ID law, a new challenge to the livelihood of public-sector unions and an appeal of Trump’s beleaguered travel ban targeting several Muslim-majority countries.

Gorsuch has given very little indication not just of how he might rule on cases like these, but also of how he views important issues of constitutional law, such as the future of abortion rights, religious accommodations and the role of money in politics. He has asserted that he would rule independently from the man who picked him for the job — despite the president’s promises to his voters that he’d choose a judge who would overturn the landmark Roe v. Wade.

“If it looks like I’m giving hints or previews or intimations about how I might rule, I think that’s the beginning of the end of the independent judiciary, if judges have to make effectively campaign promises for confirmation,” Gorsuch told the Senate Judiciary Committee last month.

This story has been updated with a statement from Trump.