With a partisan vote a week before a presidential election, Senate Republicans got what they wanted Monday night, another justice on the Supreme Court and a legacy defining it as solidly conservative for perhaps a generation.

But will they regret it, as some Senate Democrats are warning?

Republicans are facing in just seven days the potential loss of the Senate majority they’ve had since 2014. It’s not clear how much of a role Amy Coney Barrett’s confirmation is playing in any success Democrats may have in swaying that one way or the other.

As Senate Majority Leader Mitch McConnell (R-Ky.) said Monday night as the Senate confirmed Barrett, that majority allowed Republicans to hold a Democratic Supreme Court nominee for nine months because of a pending election and then rush through a Republican nominee just weeks before another election.

“The reason we were able to do what we did in 2016, 2018 and 2020,” McConnell said, referring to the three latest Supreme Court battles, “is because we had the majority.”

That might not be the case for much longer, as Democrats challenge Senate Republicans in more than a dozen races across the country.

After Trump nominated Barrett in late September, polls did not show a significant bump for either side in the Senate, despite both hoping for one. Republicans want this to motivate their base, especially people who were meh on Trump’s handling of the coronavirus pandemic, which is peeling away Trump voters in states like Montana, South Carolina, Iowa and Texas. It’s likely why McConnell chose Barrett’s confirmation over a more broadly popular yet expensive coronavirus relief package to pass before the election.

The one Republican senator up for reelection who may have been most vulnerable to this, Susan Collins of Maine, voted with Democrats to stop Barrett’s nomination.

Democrats hoped to hype up the fact that the court, especially one with Barrett on it, could knock down the Affordable Care Act in the coming months and take away health-care coverage that millions rely on. Polls right after Ruth Bader Ginsburg’s death also showed public opinion in their side. A clear majority of Americans (around 57 percent in a Washington Post-ABC News poll) wanted to wait to let the winner of the November presidential election nominate Ginsburg’s successor.

A Washington Post-ABC News poll a few weeks later as the Senate moved to confirm Barrett found that number was down to 52 percent — still a majority of Americans, but not the overwhelming mandate to oppose Barrett’s nomination that Democrats had hoped would continue.

“We had a Supreme Court fight months before the election in 2018 and we actually gained seats,” McConnell said on Fox News after the vote, referring to the contentious confirmation of Justice Brett M. Kavanaugh. “I think this nominee will be a political asset for our candidates around the country. Not a liability, but an asset.”

Another way to get back at Republicans is to take drastic steps to take away the court’s conservative majority. If Democrats win back the Senate and the White House, they’ll be under pressure from the left in their party to add as many as four seats to the nine-member Supreme Court, a historic move that would even it out politically.

Minutes after the Senate confirmed Barrett, Rep. Alexandria Ocasio-Cortez (D-N.Y.), tweeted a call to do it.

But let’s say Senate Republicans manage to keep their majority by a seat or two. (It’s going to be close either way.) How could Democrats get revenge then? Perhaps by leveraging their party’s renewed attention to judicial politics, once the domain of conservatives. After Ginsburg’s death, Democrats saw high levels of grass-roots fundraising. And there are plenty of reasons for the party to get mad at the court in the weeks and months ahead.

Democrats’ health-care law and practices championed by voting-rights advocates are already facing real threats from the court. Literally as the Senate was voting to confirm Barrett, the court ruled against Democrats in Wisconsin on whether to accept mailed ballots that arrive after Nov. 3. The decision was 5 to 3, meaning that Republicans didn’t even need Barrett on it to get the ruling they wanted in a key swing state. (Last week the court deadlocked 4 to 4 on whether to accept late-arriving ballots in Pennsylvania, technically upholding the decision to accept them.)

Barrett will be on the court to hear a case the week after the election on whether to knock down Obamacare entirely, as the Trump administration has argued it should. Democrats have used that as a political rallying cry for this November, even though there’s nothing they can do about the decision.

It’s easy to see the political fighting over courts only getting hotter in the coming months and years, but it’s harder to say which side will benefit from that. But of all the things Republicans might regret over the past few years, you could argue this isn’t likely to be one of them.

McConnell knows his majority is threatened, and he still pushed ahead with Barrett’s nomination. Whatever happens, this is apparently worth it for him and the party.