PHILADELPHIA – Pennsylvania, one of the states most likely to decide the presidential election, is bracing for one of the slowest ballot counts in the country.

The coronavirus pandemic has driven a record 2.6 million Pennsylvanians to request mail-in ballots. But state law bars the processing of those ballots until the morning of the Nov. 3 election. Before the counting can start, a cumbersome procedure is required to confirm each voter’s eligibility and extract every ballot from two envelopes.

If the race tightens — Pennsylvania polls now give Democrat Joe Biden an edge over President Donald Trump — the final result could be unknown for days, with a court fight over uncounted ballots all but certain. Trump won the state four years ago by a margin of less than 1%.

Election experts worry that Trump’s baseless allegations of rampant voter fraud could sow chaos.

Nearly two-thirds of Pennsylvania’s mail-in ballot requests have come from Democrats, so Biden is all but sure to gain ground on Trump as the count continues in the days after Nov. 3. The counties coping with the biggest numbers of mail-in ballots are the most populous — the ones where Biden will run up his strongest vote margins.

“This could be a really destructive scenario,” said Richard Pildes, a constitutional law professor at New York University. “A torrent of claims about manipulation of the process, fraudulent ballots and the like will be unleashed and spread instantly through social media, and that situation could spiral out of control from there — even if everything is being done completely legitimately and appropriately.”

Another battleground state that’s likely to face a slow count of mail-in ballots is Wisconsin, which also prohibits processing of the envelopes before Election Day. In other battleground states, such as Florida and Arizona, early processing of mail-in ballots makes it likely the public will know the results within hours of polls closing.

Former Gov. Tom Ridge, a Republican who backs Biden, fears Pennsylvania’s slow tabulation could result in violence if Trump refuses to accept that voters have bounced him from office. Trump has claimed for months that only two outcomes are possible: Either he’ll win or Democrats will steal the election.

“He’s created the potential for enormous civil unrest because of his unpresidential approach,” said Ridge, a former Homeland Security secretary. “Frankly, it’s an un-American approach.”

Trump’s big worry is Philadelphia, where in 2016 he finished more than 475,000 votes behind Hillary Clinton. In his Sept. 29 debate with Biden, Trump said “bad things happen” in Philadelphia elections and urged supporters “to go into the polls and watch very carefully.”

More than 350,000 voters in Philadelphia have requested mail-in ballots, up from just 15,000 four years ago. Each one requires several steps of processing, including opening two envelopes and unfolding the ballot.

A state Supreme Court ruling requires ballots postmarked by Nov. 3 that arrive up to three days later to be counted, so Pennsylvania’s final tally can’t be finished before Nov. 6. Republican lawmakers, who say all ballots that have not arrived by Nov. 3 should be void, have appealed to the U.S. Supreme Court.