PHILADELPHIA — Pennsylvania's governor pleaded for patience Tuesday night as his state began counting votes in a contest with the potential to decide it all in this year's presidential race, but that could take days to resolve.

“I encourage all of you to take a deep breath,” Gov. Tom Wolf (D) said during a news conference. “What’s most important is that we have accurate results, and that each vote is counted.”

But even as he spoke, Republicans were filing suit to block the counting of votes, at least temporarily, by people who were allowed to correct mistakes on their mail-in ballots. Wolf’s plea also ran counter to President Trump’s insistence — frequently expressed during the campaign’s waning days — that the country should know the results on election night.

Ever before Election Day, that was never going to be possible in Pennsylvania, where state law prohibited any counting of absentee ballots until Tuesday morning. A handful of counties had already said they would not begin the process until Wednesday.

Just after midnight Wednesday, some 60 percent of ballots had been tabulated statewide. The partial results showed Trump leading. But many rural, conservative areas had completed their counts, even as major metro areas worked to catch up.

With yellow-vested election workers expected to count ballots through the night at the convention center in Philadelphia, it was far too early to draw conclusions about a state that both Trump and Democratic nominee Joe Biden have considered crucial to their prospects of victory.

Trump won the state — and its 20 electoral votes — by less than 1 percent in 2016, a victory that helped propel him to the White House. An average of pre-election polls showed Biden with an advantage of about five points.

Results began coming in Tuesday night after a surprisingly calm Election Day for the Keystone State, with long lines in many places and a few hiccups at some, but none of the sort of widespread irregularities that officials had feared. In Philadelphia, the state’s largest city, officials said they were fielding more calls about online misinformation than they were about actual problems at polling places.

“None of the issues,” Wolf said, “rise beyond the run-of-the-mill.”

But the post-election period could be messy, with the question of whose ballots are counted winding up in the courts as Republican lawmakers in the GOP-dominated legislature challenge the state’s Democratic administration.

Trump had said Sunday that “as soon as that election is over, we’re going in with our lawyers.” But some Republicans on Tuesday did not appear to be waiting.

A Republican congressional candidate in Pennsylvania’s Montgomery County sued county authorities as voters cast their ballots Tuesday in an attempt to throw out mail ballots containing errors that were corrected by voters.

The GOP filed a similar lawsuit statewide on Tuesday night, focused on so-called “cured” ballots. Attorneys for two Republican candidates submitted a complaint in commonwealth court alleging that Secretary of State Kathy Boockvar (D) broke state law by advising county officials on Monday to help mail voters resolve errors detected during an initial check of their ballots.

The Republicans alleged that county officials should not have started checking mail ballots until Election Day. While the number of ballots at stake is believed to be relatively small, they could be critical in a closely contested race.

Republican leaders in the state Senate escalated the confrontation with a call for Boockvar to resign late Tuesday night, accusing her of issuing guidance for counting late ballots that conflicted with state rules.

Boockvar said Tuesday night that she “completely disputes” the allegation that her office had broken the law and was prepared to fight in court. In a press conference just before midnight, she accused Republicans of trying to suppress the vote.

“They don’t like the late counting of ballots because they don’t like more eligible voters to be enfranchised,” she said. “Let’s be clear about that.”

Wolf in a post-midnight statement called the GOP senators’ demands “a partisan attack on Pennsylvania’s elections and our votes.”

She did not mention Trump, who has repeatedly said the outcome of the election should be known Tuesday night — and claimed, without evidence, that ballots counted beyond that could be fraudulent.

For an array of reasons, Pennsylvania was the center of the nation’s political universe Tuesday. The state’s competitiveness, its election rules and its procedures for counting the ballots all make it especially contentious.

Pre-election forecasts had suggested the state was likeliest to be the tipping point that delivers the electoral college to either Biden or Trump, and that remained possible early Wednesday as the outcome in other states was called.

In many battleground states, a majority of the expected ballots had already been cast before Tuesday. That wasn’t true for Pennsylvania, where the rules for early voting were more stringent. Over 2.5 million mail-in ballots had been received as of Tuesday morning, Boockvar said, or about 40 percent of the total ballots cast in 2016.

Of those, more than 1.6 million were from Democrats, compared with 586,000 from Republicans and 278,000 from other political parties. But Republicans were expected to narrow that gap — and perhaps erase it — with Election Day voting.

The long lines at many polling places Tuesday reflected high levels of enthusiasm on both sides, with voters across Pennsylvania who waited in the chilly morning sunshine appearing to be acutely aware of the stakes.

Many showed up before dawn, waiting to cast their ballots when the polls opened at 7.

In Swissvale, a borough seven miles southeast of Pittsburgh, the line to vote was down the block of McClure Avenue, and longtime residents said they had never seen it so long.

Among the first to show up were Myisha Rose, 42, and her son, Jordan Scarbrough, 22. Both wore masks with their winter jackets and were primed to cast ballots for Biden.

Rose, a health-care benefits administrator, said the coronavirus pandemic has only made it clearer to her that there needs to be a change at the White House.

“Covid has made everyone think about their priorities,” she said.

Scarbrough, a sociology senior at California University of Pennsylvania, said he didn’t vote for Trump in 2016 and wouldn’t this time, either. “He’s too divisive,” he said.

In another Pittsburgh suburb, there was another long line: It swooped along the circular drive to Cranberry Highlands Golf Course and down the hill, farther than voters said they had seen on a voting day. But in this line, support for Trump appeared to be running high.

Jack and Kay Marcinick, retirees ready to buy a home in Georgia, said they had no doubts about their candidate.

They had lived in Cranberry Township since 1983 and were living mostly in Georgia these days. But they drove 11 hours this week to cast their ballots in Pennsylvania for Trump.

“He’s done a lot for the economy,” said Jack Marcinick, 70, who worked in food distribution and moved to Cranberry when cornfields were plentiful.

Kay Marcinick, 68, a onetime school nurse, said Trump had done well, even amid the challenges of the pandemic. “I don’t blame anything on him,” she said. “No one could have done much better.”

Even as voters cast their ballots, campaigning remained in full swing.

“It’s good to be home,” Biden said of the working-class town where he resided through the fourth grade. The former vice president ticked off several reasons he is running, including “to restore the soul of the country,” before mingling with some of his supporters.

On the living room wall of his childhood home, he wrote a message: “From this house to the White House with the grace of God. Joe Biden 11-3-2020.”

Trump was not in Pennsylvania Tuesday, but he had been there Monday and recurring times in recent weeks.

At a Monday afternoon rally in Avoca, Pa., the president suggested that Democrats in Pennsylvania will try to steal the election — a charge he makes often.

Trump has taken particular aim at the state’s decision to allow absentee ballots postmarked by Tuesday — but received after Tuesday — to be counted. The Supreme Court has twice declined to block the practice, which was upheld by state courts.

“You can’t extend the dates,” Trump said Monday. He warned about “the danger that could be caused by that extension — and especially when you know what goes on in Philadelphia. And it’s been going on for years.”

A top Trump campaign official on Tuesday attempted to give fraud claims a boost, tweeting out allegations that the campaign’s poll watchers had been kept too far from voters to meaningfully observe the process. He also posted photos showing what he said was a man distributing pro-Democratic Party leaflets to voters standing in line in Philadelphia.

“They are STEALING it! This needs to STOP!” Mike Roman, the Trump campaign’s Election Day operations director, tweeted.

Philadelphia’s district attorney replied with a tweet calling Roman’s claims “deliberately deceptive.”

“Members of our Election Task Force have investigated this allegation,” wrote the office of Philadelphia District Attorney Larry Krasner, a Democrat. “This polling place is located in an interior room and the sign in question is further than 10 feet from it.”

Philadelphia officials said they had seen minimal problems at polling places throughout the city on Election Day. The city’s Election Task Force said in a news release that it had quickly resolved the vast majority of issues.

In the flood of misinformation about voting by mail that buffeted the country in the closing days of the campaign, Pennsylvania was hit most severely, data suggests.

The state accounted for more misleading mentions of mail balloting than any other state — 227,000 of the roughly 1.1 million overall mentions tracked in September and October by Zignal Labs, a media intelligence firm.

Zignal’s platform vacuums up material across social and traditional media. Baseless narratives about malfeasance in Pennsylvania quickly went viral on Tuesday, with one hashtag alleging widespread fraud intensifying from several dozen mentions to more than 2,000 in just 15 minutes on Tuesday morning.

Even as legal fights and a potentially protracted count loomed, many voters said they were feeling hopeful that their candidate would win — and that the results would be respected.

At one West Philadelphia polling place, 56-year-old Jeanie Kelson took a deep breath as she walked out at sunset on Tuesday, having cast her ballot for Biden.

“I’m feeling blessed,” said Kelson, who had just finished a 16-hour shift as a health aid. “Hopefully soon I’ll feel blessed-er.”

Swaine and Witte reported from Washington. Spolar reported from Swissvale and Cranberry. Cat Zakrzewski in Philadelphia, Kellie Gormley in Scranton, Amy Worden in Harrisburg and Isaac Stanley-Becker contributed to this report.