A federal judge on Saturday nixed a lawsuit brought by President Trump’s campaign that sought to throw out millions of mail-in votes in Pennsylvania.

Judge Matthew Brann handed down the ruling, describing the suit as marred by “strained legal arguments without merit and speculative accusations … unsupported by evidence.”

The Trump campaign, led by the president’s personal attorney, Rudy Giuliani, had challenged Pennsylvania’s results by claiming election officials in heavily Democratic counties illegally allowed voters to fix mail-in ballots that had problems, such as missing “secrecy envelopes.”

Pennsylvania Secretary of State Kathy Boockvar and the seven counties that the campaign sued countered that Trump had previously raised similar claims and lost — and that the proposed tossing of millions of votes over isolated issues was a fix that is far too extreme.

“There is no justification on any level for the radical disenfranchisement they seek,” Boockvar’s lawyers wrote in a brief filed Thursday.

In his ruling, Brann said that he “has no authority to take away the right to vote of even a single person, let alone millions of citizens.”

The decision paves the way for the Keystone State to certify President-elect Joe Biden’s victory there and deals a blow to Trump’s efforts to overturn the results of the Nov. 3 election.

Counties must now certify their results to Boockvar by Monday. She’ll then make her own certification of the results, which show Biden winning the state by more than 80,000 votes.

With Post wires