The last active legal challenge to Pennsylvania’s presidential election results was tossed Saturday by the state’s highest court, which balked at a request from one of President Donald Trump’s top boosters in Congress to disenfranchise some 2.6 million voters by throwing out every ballot cast by mail.

In a unanimous decision, the justices declared that Rep. Mike Kelly (R., Butler) had waited too long to bring his lawsuit seeking to overturn the 2019 law that created no-excuse mail voting in the state for the first time, and they declared the remedy he sought too extreme.

Had Kelly and the suit’s seven other Republican plaintiffs been forthright in their concerns over the constitutionality of the mail-voting statute, the court found, they would have filed their legal challenge before the new law was used in a primary and general election and would not have waited only until after it had become apparent that their favored candidate had lost.

“It is not our role to lend legitimacy to such transparent and untimely efforts to subvert the will of Pennsylvania voters,” Justice David N. Wecht wrote in an opinion concurring with the full court’s terse, three-page order. “Courts should not decide elections when the will of the voters is clear.”

A spokesperson for Kelly did not respond to requests for comment after the ruling Saturday evening.

Sean Parnell — one of the suit’s other plaintiffs, who lost a bid this month to unseat incumbent Rep. Conor Lamb (D., Pa.) — declared in a tweet: “It’s not over. This was not unexpected. Stay tuned.” (Running in the GOP primary this spring, Parnell had endorsed the new “bipartisan system” created by the state’s vote-by-mail law in a tweet and encouraged his supporters to use it.)

And while the Trump campaign was not a party to the case, the president’s legal adviser Jenna Ellis dismissed the court’s ruling in a statement, calling it part of a “ridiculous political game,” and vowed the Trump team would continue to press its case at the U.S. Supreme Court.

State officials hailed Saturday’s decision as a victory.

“We just notched another win for democracy,” said Attorney General Josh Shapiro, a Democrat whose office represented elections administrators in the case along with a team of private attorneys led by Philadelphia lawyer Michele D. Hangley.

The decision came just a day after a federal appeals court dismissed the Trump campaign’s own primary and final legal challenge disputing President-elect Joe Biden’s victory in the state, calling it “light on facts” and “breathtaking” in the presumptuousness of its request, similar to Kelly’s, to throw out the ballots of millions of voters.

» READ MORE: ‘Voters, not lawyers, choose the president’: Federal appeals court rejects Trump’s last significant challenge to Pa. election

But from the moment of its filing last weekend, Kelly’s lawsuit rested on even shakier legal ground. More than 11 other direct attempts by the Trump campaign to challenge Pennsylvania votes in court had failed, lacking evidence, and there was little chance that any judge would have granted the congressman’s request to either invalidate every ballot cast by mail or disregard the entire election and appoint the state legislature to declare the winner of the state without even an allegation that fraud had occurred.

Still, a surprising ruling from a lower appellate court judge Wednesday briefly upended those dim expectations. In an order that was quickly stayed by the appeal to the Supreme Court, Commonwealth Court Judge Patricia McCullough, elected as a Republican in 2009, barred the state from taking any further action to certify its election results pending a hearing on the case.

Although the state had already completed that certification for its presidential results, declaring Biden the state’s victor by some 81,000 votes, her decision cast several down-ballot races that had not yet been certified, including Kelly’s own reelection, into doubt and threatened to upend the entire state government.

Because all members of the state House of Representatives and half of the 50 state senators officially end their terms Monday, McCullough’s ruling had it been allowed to stand could have barred newly elected and reelected lawmakers from being seated for the General Assembly’s next term.

Wecht, a Democrat, in his concurring opinion Saturday noted the untenableness of that result, pointing out that at the same time Kelly was asking the court to appoint state legislators to choose the winner of the presidential race in Pennsylvania he was pursuing a court order that would have potentially left no quorum of lawmakers in place to make that decision.

Even still, the justice added: “There is no basis in law by which the courts may grant [the] request to ignore the results of an election and recommit the choice to the General Assembly to substitute its preferred state of electors for the one chosen by a majority of Pennsylvania voters.”

While both the Supreme Court’s Democratic and Republican justices agreed on that point, they split along partisan lines as to whether Kelly’s underlying complaints about the constitutionality of the vote-by-mail law deserved further consideration.

The congressman had argued that the state legislature did not have the authority on its own to expand the availability of remote voting in 2019 and that if the legislators wished to do so it would have required an amendment to the state constitution.

Chief Justice Thomas Saylor noted in a separate opinion Saturday — joined by the only other Republican on the court, Justice Sallie Mundy — that the congressman’s suit “posed troublesome questions about the constitutional validity of the new mail-in voting scheme” and said he would have been open to letting lower courts decide whether the law should remain in place for future elections.

Still, the Republican justices concluded: “There has been too much good-faith reliance, by the electorate, on the no-excuse mail-in voting regime … to warrant judicial consideration of the extreme and untenable remedies proposed” for this election.

In addition to Kelly, who was reelected this year based in part on 35,000 mail ballots, and Parnell, the plaintiffs were five GOP voters from Erie, Mercer, and Allegheny Counties as well as another losing GOP candidate, Philadelphian Wanda Logan, who was beaten by Democrat Amen Brown in a state House race.