Judge Jeffrey Trauger said in a one-page order that Bucks County voters who want to apply for an early mail ballot now have until Friday at 5 p.m.
The Trump campaign's lawsuit, which was filed Wednesday morning, comes amid a flurry of litigation and complaints over voting in a battleground state that is expected to play a central role in helping select the next president in 2024's election.
The lawsuit sought a one-day extension, through Wednesday at 5 p.m., for voters to apply in person for a mail-in ballot. However, the judge's order permits applications through the close of business on Friday.
Voters waited up to three hours on Tuesday. Those still in line at 5 p.m. were told to go home, the lawsuit said.
"They were telling us the line was so long that they anticipated the marker -- they anticipated that's the time they would get in by 5 p.m., but that's not what the website said. So a lot of people were upset and I'm so excited this was what was decided because voters -- whatever their party -- felt they didn't get a chance to, and they should have," Pat Poprik, the Bucks County Republican Committee Chair, told Action News.
The Trump campaign lawsuit said people who were in line by Tuesday's 5 p.m. deadline to apply in person for a mail ballot should have been allowed to get a ballot, even after the deadline. However, Bucks County's election office denied voters that right and ordered them to leave, the lawsuit said.
"This is a direct violation of Pennsylvanians' rights to cast their ballot - and all voters have a right to STAY in line," the Trump campaign said in a statement.
Craig Edwards, who was in line Tuesday, said he was thrilled he got the chance to vote Wednesday.
"It's a very big one. So we're psyched to do it," he said.
YOUR VOICE, YOUR VOTE | Check out 6abc's Pennsylvania voter guide
However, Edwards said he was told they could get a mail-in ballot application but they could not submit it on-site because it took too long to fill out.
"They put a cone out, and they said nobody after this point, and so when we got here the cone was in front of us, obviously, because we had come at about 4 p.m.. And we got all the way to the building around a quarter to 4 p.m. and they said we're not letting you in. I thought Pennsylvania statute said as long as you are in line you can get in, and they said 'no,'" Edwards explained.
The Republican National Committee and the campaign of Republican Senate nominee David McCormick joined the lawsuit against Bucks County, where Democrats control the government in a closely politically divided county often seen as a political bellwether.
Gov. Josh Shapiro's administration had urged counties to allow every voter who was in line by the 5 p.m. deadline to submit a mail-in ballot application. Responding to criticism and misinformation on social media Tuesday, Bucks County had said every voter in line by 5 p.m. Tuesday would be allowed to apply for a mail ballot.
Pennsylvania does not allow early voting on voting machines in polling places, as some states do.
But Bucks County, like other counties in Pennsylvania, allows voters to apply for a mail-in ballot in person at the elections office and receive it there, a time-consuming process strained to the limit by Trump's exhortations to his supporters to get out and vote before Tuesday's deadline. Voters can also fill it out and hand it in at the office.
County officials released a statement after the ruling saying they are pleased to offer additional time, but added, "This administration continues to ask the Pennsylvania General Assembly for much-needed reform and clarity in the election law."
RELATED: Separating fact from fiction in Pennsylvania's election process
Neighboring Lehigh County on Tuesday asked a judge to extend the deadline there by one day, through Wednesday, because road closures in downtown Allentown around Trump's rally blocked access to the elections office. The judge agreed.
A steady stream of voters took advantage of the one-day extension in Lehigh County on Wednesday, descending to the basement office of the voter registration office in Allentown to apply for a mail-in ballot, fill it out and turn it in. County elections workers explained the process as voters stepped off the elevator into a crowded hallway.
"There are wonderful reps here who are telling everybody what to do, how to do it. It's moving smoothly. I'm excited to be here," Jeanne Birosik, a Republican voter, said as she waited for elections workers to prepare her mail ballot.
Birosik typically votes on Election Day, but in 2020, she said, she showed up to her polling place and was incorrectly told she'd already voted. She filled out a provisional ballot that time, but didn't want to leave anything to chance for this election.
"This just seemed like a safer way to go about it," she said.
Her husband, Chris Birosik, 62, who was also there to vote, said they didn't consider dropping their ballots in the mail weeks ago - too risky, in his view.
"I just feel more confident that we get it in and do it this way," he said.
The early voting angst in Bucks County is the latest dustup over voting in Pennsylvania, which has the largest trove of electoral votes of any battleground state and is by far the state most visited by the Democratic and Republican presidential tickets this year. The runup to Election Day in the state has been marked by numerous battles over mail ballots, some landing on the doorstep of the U.S. Supreme Court.
The Associated Press contributed to this report.