Judge Matthew Brann in the battleground state of Pennsylvania has dismissed a lawsuit from the Trump campaign that sought to invalidate millions of mail-in votes in the state.
The judge said the suit, which rested on allegations of irregularities, was “without merit”.
The move paves the way for Pennsylvania to next week certify Joe Biden’s win – the Democratic candidate leads by more than 80,000 votes.
It is the latest blow to the incumbent, Donald Trump, who is trying to overturn his loss in the 3 November US presidential election.
He has refused to concede and made allegations of widespread electoral fraud, without providing any evidence.
The lack of a concession has upended the process that normally follows a US election.
Joe Biden is projected to defeat President Trump by 306 to 232 in the US electoral college, which determines who becomes president – far above the 270 he needs to win.
Read also: Trump bid to overturn Biden’s win suffers double blow
The Trump campaign has lost a number of lawsuits contesting results from the election, and its latest efforts focus on stopping the swing states that handed Mr Biden his win certifying the results – an essential step for the Democrat to be formally declared winner.
In the ruling Judge Brann wrote that the Trump campaign had tried to “disenfranchise almost seven million voters”.
Judge Matthew Brann said his “court has been presented with strained legal arguments without merit and speculative accusations”.
He wrote, “in the United States of America, this cannot justify the disenfranchisement of a single voter, let alone all the voters of its sixth most populated state.”
The Trump campaign argued that the state had violated the US Constitution’s guarantee of equal protection under the law as some Democratic-run counties allowed voters to fix errors on their ballots while Republican-run counties did not.
But in his ruling Judge Matthew Brann dismissed the claim, saying “like Frankenstein’s Monster” it had been “haphazardly stitched together”. He said even if it was the basis for a case then the Trump campaign’s solution went too far.