PHILADELPHIA (WPVI) -- Legal challenges and a mountain of uncounted ballots promised a long watch Wednesday to find out who the people of Pennsylvania chose as president, even as a host of other major races in the state - including for several congressional seats, statewide officers and the legislature - stayed unresolved.
Voters turned out in large numbers for an election that produced few of the glitches some had feared. But the state's decision to greatly expand mail-in voting means it could still be days before it's clear whether President Donald Trump repeated his surprise Pennsylvania victory from four years ago or whether native son Joe Biden would collect its 20 electoral votes, the most of any state yet to be called by The Associated Press.
ELECTION COVERAGE: LIVE updates and resources for Election Day 2020 in Pa., N.J. and Del.
"What's most important is that we have accurate results and that every vote is counted, even if that takes a little longer," Democratic Gov. Tom Wolf said after polls closed. "So I'm urging Pennsylvania to just to remain calm, be patient, stay united on election night and in the days ahead."
Philadelphia City Commissioners, elected officials who oversee elections, announced Wednesday morning that ballots will continue to be counted after experiencing a delay with counting in-person votes.
Election officials said as of about 4 p.m., they've counted more than 230,000 absentee mail-in ballots and still have more to go. They aren't saying when exactly they expect to be done, but said sometime Thursday morning is a good target.
Republican Philadelphia City Commissioner Al Schmidt tweeted Wednesday morning that, "Philadelphia will NOT stop counting ALL legitimate votes cast by eligible voters. And we will report and report and report until the last vote is counted."
Two hours later, he gave this update: "Moments ago, we updated our results page to include more than 65,000 mail-in votes cast by Philadelphia voters, with many more yet to count."
Election officials are describing it as an army of people working behind the scenes overnight and into the morning to get all votes counted.
Commissioners said there was a delay getting in-person voting machines back to regional centers to finish counting votes after polls closed.
Democratic City Commissioner Lisa Deeley said they must get those remaining votes into the counting machines before adding additional mail-in ballots because of how the system is configured.
They hope to get back on track while managing the record number of more than 400,000 mail-in ballots returned in Philadelphia.
"We've never had to count this large number of mail-in ballots and have an in-person election. We thought we had timed it right, but truthfully we've never done it before in this large number," Deeley said.
Republicans and a voter filed a federal lawsuit accusing officials in suburban Philadelphia's Montgomery County of illegally processing mail-in ballots before Tuesday for the purpose of allowing voters to fix problems with their ballots.
A federal judge in Philadelphia set a hearing for Wednesday morning on the bid to stop the count of 49 ballots that were amended and returned there.
WATCH: Ballot counting underway at Pennsylvania Convention Center in Philadelphia
But the state's highest court has not prohibited counties from allowing voters to fix their ballots, said Kelly Cofrancisco, a county spokesperson.
"We believe in doing whatever we can to afford those who have legally requested and returned a ballot a fair opportunity to have their vote count," Cofrancisco said.
Also, in a lawsuit filed Tuesday night in a statewide appellate court, Republican U.S. Rep. Mike Kelly of Pennsylvania and five other plaintiffs asked to block counties from allowing voters whose mail-in ballots were disqualified to be able to cast a vote by provisional ballot.
The lawsuit said the state Supreme Court has already ruled that state law provides no such avenue for a voter to fix a disqualified vote. In Oct. 21 guidance to counties, state elections officials said a voter whose mail-in or absentee ballot was rejected could still vote in person by a provisional ballot.
The state's top election official, Kathy Boockvar, insisted that the practice singled out by the lawsuit is legal. Regardless, she said there aren't "overwhelming" numbers of voters who cast provisional ballots after their mail-in ballots were disqualified, but she did not give an exact figure.
The state Supreme Court - citing Postal Service delays, the huge number of people voting by mail because of COVID-19, and the strain on county boards of election - ordered counties to count mail-in ballots received as many as three days after the vote, so long as they were mailed by Election Day.
The U.S. Supreme Court rejected a Republican effort to block the counting of late-arriving mail-in votes, but it could revisit the issue.
Trump has tried to sow doubt about the fairness of the election, saying the only way Democrats could win Pennsylvania is to cheat. Without evidence, he said Monday that the three-day period for mailed ballots would allow "rampant and unchecked cheating" and would induce street violence.
And early Wednesday, he stated without evidence that Democrats were trying to "steal" the election. He also falsely said votes could not be cast after polls closed.
Later in an appearance at the White House, he made premature claims of victory and said he would take the election to the Supreme Court. It was unclear exactly what legal action he might try to pursue.
WATCH: Ballot counting underway across Pennsylvania
The unrest he predicted did not materialize in Pennsylvania, but scattered voting issues included problems with voting machines and tardy poll workers.
A judge ordered a polling place in Scranton, Democrat Biden's hometown, to remain open an additional 45 minutes because machines had been briefly out of commission earlier in the day.
All of Pennsylvania's 18 members of Congress sought reelection, and in early results, at least 11 won - Republicans John Joyce, Fred Keller, Guy Reschenthaler, Glenn Thompson, Lloyd Smucker and Dan Meuser; and Democrats Mike Doyle, Dwight Evans, Brendan Boyle, Mary Gay Scanlon and Madeleine Dean.
A pair of Democratic incumbents, Attorney General Josh Shapiro and Treasurer Joe Torsella, sought reelection, while Pennsylvanians also voted for a new auditor general to replace term-limited Democrat Eugene DePasquale.
Control of the state House was also at stake, with Democrats needing nine seats to seize the majority from Republicans after a decade out of power. Democrats also had a gap to make up in the state Senate.
Lines were long around the state. In chilly Philadelphia, Shavere McLean, 36, bundled up and brought coffee, a chair and snacks as she waited to vote for Biden, saying, "I just want a better leader, someone who cares about everyone."
In the Delaware River town of Milford, cars honked at Gail Just, 70, as she held a Trump-Pence sign, saying she supports Trump because he "gets things done."
-- The Associated Press contributed to this report.