A federal judge dismissed a lawsuit critical to President Donald Trump's long-shot bid to overturn his election loss to Democratic President-elect Joe Biden, calling his legal claim a "Frankenstein's Monster".
The Trump campaign had sought to prevent state officials from certifying the results of the election in the state.
US District Judge Matthew Brann in Williamsport, Pennsylvania, described the case as "strained legal arguments without merit and speculative accusations".
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 lawsuit before Brann was filed on November 9 and had alleged inconsistent treatment by county election officials of mail-in ballots. Some counties notified voters that they could fix minor defects such as missing "secrecy envelopes" while others did not.
"This claim, like Frankenstein's Monster, has been haphazardly stitched together," wrote Brann.
Brann, nominated by former President Barack Obama, is a Republican and, according to his biography, a member of the Federalist Society, a group of conservative and libertarian lawyers, law students and scholars.
Trump's lawyer Rudy Giuliani said in a statement he was disappointed with the ruling and will appeal. "Today’s decision turns out to help us in our strategy to get expeditiously to the US Supreme Court," he said.
The campaign will ask the third US Circuit Court of Appeals in Philadelphia to review the ruling on an accelerated timetable, according to Giuliani. A majority of that circuit's judges were nominated by Republican presidents. Four were nominated by Trump.
For Trump to have any hope of overturning the election, he needs to reverse the outcome in Pennsylvania, which is scheduled to be certified by state officials on Monday.
"Today's ruling is a victory for the rule of law, and for the voters of Pennsylvania, whom the Trump campaign sought to disenfranchise on the flimsiest legal theory imaginable," wrote election law scholar Rick Hasen on Twitter.
The Trump campaign and its supporters have filed dozens of lawsuits in six closely contested states. The campaign's only victories extended the Election Day voting hours at a handful of polling places in Nevada and set aside some provisional ballots in Pennsylvania, according to court records.
Attempts to thwart the certification of the election have failed in courts in Georgia, Michigan and Arizona.
In the Pennsylvania case, Brann also denied a campaign request to amend the suit to claim violations of the U.S. Constitution. The campaign wanted Brann to allow Pennsylvania's Republican-controlled state legislature to appoint electors who would back for Trump at the Electoral College vote on December 14.
Under Pennsylvania law, the candidate who wins the popular vote in the state gets all the state's electoral votes.
A presidential candidate needs 270 electoral votes to win the election, and Biden leads in the electoral vote count by 306-232.
Electoral votes are allocated among the 50 states and the District of Columbia based roughly on population.