Elements of the ruling by U.S. District Judge J. Nicholas Ranjan could be appealed by Trump's campaign, with barely three weeks to go until Election Day in a state hotly contested by Trump and Democratic presidential nominee Joe Biden.
Trump's campaign wanted the court to free county election officials to disqualify mail-in ballots where the voter's signature may not match their signature on file and to remove a county residency requirement in state law on certified poll watchers.
RELATED: 'Naked ballots' in Pennsylvania could be election wild card
It also wanted the court to bar counties from using drop boxes or mobile sites to collect mail-in ballots that are not "staffed, secured, and employed consistently within and across all 67 of Pennsylvania's counties."
The lawsuit was opposed by the administration of Gov. Tom Wolf, a Democrat, and the state Democratic Party.
The decision comes as Trump claims he can only lose the state if Democrats cheat and, as he did in 2016s campaign, suggests that the Democratic bastion of Philadelphia needs to be watched closely for election fraud.
Democrats counter that Trump is running on the conspiracy of election fraud because he cannot run on a record of fraud and mismanagement.
RELATED: Vote 2020: Election Resources for Pennsylvania, New Jersey and Delaware