A judge in Pennsylvania has dismissed a lawsuit from the Trump campaign that sought to invalidate millions of mail-in votes in the battleground state.
Judge Matthew Brann 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 - he leads by more than 80,000 votes.
It is the latest blow to Donald Trump, who is trying to overturn his loss in the 3 November 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.
Mr Biden is projected to defeat President Trump 306 to 232 in the US electoral college, which determines who becomes president - far above the 270 he needs to win.
The Trump campaign has lost a slew 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 victor.
Pennsylvania judge gives scathing verdict
He said his "court has been presented with strained legal arguments without merit and speculative accusations".
"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 judge wrote.
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 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.
Few Republicans have called on the president to concede, but following the judge's ruling Republican Pennsylvania Senator Pat Toomey said Mr Trump had exhausted all legal options in the state and urged him to accept the result.
On Sunday afternoon, the Trump legal team confirmed they were appealing against the Pennsylvania decision.
Earlier his lawyer Rudy Giuliani said in a statement: "Today's decision turns out to help us in our strategy to get expeditiously to the US Supreme Court."
There is no standard route to the Supreme Court, but challenges would usually have to be upheld in a state court first, before the issue could be escalated.
Legitimate federal or constitutional question would also have to be at the heart of the complaint.
What's the situation in other battleground states?
Also on Saturday the Trump campaign called for another recount in Georgia, a day after a by-hand recount confirmed Mr Biden's win in the state.
The campaign said it "has to include signature matching and other vital safeguards".
In another swing state won by Mr Biden, Michigan, Republican officials wrote to the state's electoral board to request a two-week delay in certifying the results.
They called for an audit of the presidential vote in the largest county, home to Detroit, after it was contested by the Trump camp.
But the Michigan Department of State said delays and audits were not permitted by law.
In Wisconsin, election officials accused Trump supporters of obstructing the state's recount of votes. They said observers for Mr Trump were in some cases challenging every single ballot to deliberately slow down proceedings.
If the recount is not concluded by 1 December - the deadline for Wisconsin to certify its votes - the way is open for the Trump camp to pursue a lawsuit.
Why is election certification important?
When Americans vote in a presidential election, they are actually voting in a state contest, not a national one.
They are voting for state electors who will then cast one vote each for president. These electors usually follow the will of the electorate - in Michigan, for instance, they should all vote for Joe Biden because he won the state.
The states get a varying number of votes, equivalent to the number of their representatives in the US Congress - the House and the Senate.
Many world leaders have already congratulated Mr Biden based on his projected victory, as is customary in every US election.
Russian President Vladimir Putin is one of the few holdouts. "I want to assure you: there is no subtext here. It is not that we like or dislike someone - we are just waiting for the [US} domestic political stand-off to end," he told state television channel Rossiya 1 in an interview.
After the 2016 US election, President Putin congratulated Mr Trump the morning after voting day.
Formality or undue significance?
What is typically a mere formality during normal elections - the bipartisan certification of state vote totals - has become the latest battleground in the president's attempts to maintain power for the next four years.
Could Trump actually be successful? It's not impossible, but the chances are very, very slim. First of all, the president would have to overturn the results in multiple states, where Biden's leads range from tens of thousands of votes to more than a hundred thousand. This isn't 2000, when everything came down just to Florida.
What's more, many of the states Trump's legal team is targeting - Michigan, Wisconsin and Pennsylvania - have Democratic governors who are not going to sit idly by while all of this takes place.
That doesn't mean Biden's supporters aren't worried, however. While the odds of this happening are along the lines of the earth being hit by a giant meteor or someone getting struck by lightning while winning the lottery, having victory snatched away at this point would be such a cataclysmic political event that the remote prospect of such a possibility is enough to give Democrats cold sweats.