PITTSBURGH (NYTIMES) - Pennsylvania, the state with the largest trove of electoral votes still up for grabs, inched ahead in its counting of more than one million outstanding mail-in ballots on Wednesday (Nov 4), a majority of them from Democratic strongholds, as Mr Joe Biden cut into his deficit with President Donald Trump.
With narrow wins in Wisconsin and Michigan called on Wednesday afternoon, Mr Biden has flipped two of the three northern industrial states that handed Mr Trump the White House in 2016.
Pennsylvania, the last of those so-called blue-wall states, loomed as a battleground that Mr Trump must win again to secure re-election.
Mr Biden has a slightly broader path to attaining 270 electoral votes, but a Pennsylvania victory would put him over the top.
Officials from both parties vigorously made their cases that the composition of the uncounted mail-in votes ensured that a Pennsylvania victory was at hand for their candidate.
Democrats pointed to hundreds of thousands of uncounted ballots in Philadelphia and its suburbs, and to the fact that the mail-in votes had so far run four-to-one in Mr Biden's favour.
"Biden probably wins the state by roughly 100,000," predicted Mr Rich Fitzgerald, the Democratic county executive of Allegheny County, which includes Pittsburgh.
But Mr Bill Stepien, Mr Trump's campaign manager, argued that the urban and suburban ballots would give only 250,000 extra votes to Mr Biden, who as of Wednesday evening trailed Mr Trump by 192,380 votes, a three percentage point deficit that the former vice-president had chiselled away at all day.
Mr Stepien said that mail ballots in more conservative counties, including York, Butler and Blair, would cut into Mr Biden's margins.
Both sides are manoeuvring for a possible ballot-by-ballot legal fight if the race is extremely close. They may all be waiting for a few more days.
"We're talking about a matter of days before the overwhelming majority of ballots are counted," Ms Kathy Boockvar, the secretary of state, said at a news conference on Wednesday night.
Lawyers for the Trump campaign, including the President's personal lawyer, Mr Rudy Giuliani, have descended on the state to mount court challenges.
Republicans have filed multiple lawsuits, questioning how voters were notified of issues with mail-in ballots and allowed to cast provisional ballots.
Hearings were held both in Montgomery County, outside Philadelphia, and at the state level.
The Trump campaign also said it would file a suit to stop the counting of mail-in ballots, claiming election officials were not allowing party observers to closely monitor the process, particularly in Philadelphia.
And the campaign moved to intervene in a case before the US Supreme Court, hoping to stop ballots postmarked by Election Day, but received up to three days later, from being counted.
Governor Tom Wolf, a Democrat, condemned the legal manoeuvres.
"Our election officials at the state and local level should be free to do their jobs without intimidation or attacks," Mr Wolf said in a statement.
"These attempts to subvert the democratic process are disgraceful."
If the race comes down to the wire, the fate of thousands of provisional ballots set to be counted next week might also be in play.
Many voters who requested mail-in ballots but decided to vote in person instead and did not bring their mail ballots with them to be "spoiled", or rendered unusable, were given provisional ballots, said Ms Bethany Hallam, a member of the elections board of Allegheny County.
At least one Republican lawsuit was filed to throw out certain provisional ballots, and Ms Hallam expects more are coming.
Mr Trump "sent his entire legal team to Pennsylvania to try to invalidate legal votes in whatever way possible", Ms Hallam said.
No matter who ends up winning the battle for Pennsylvania, the geography and the closeness of the race revealed a state pulling ever further apart along regional and partisan lines.
Suburbs outside Philadelphia and Pittsburgh that once leaned Republican have become treacherous for the party under Mr Trump, while blue-collar counties, where Democrats used to win election after election, have moved to the populist right.
Mr Biden, a Scranton native whose pitch to Democrats was always that he could woo back white working-class voters, fell short of that goal.
Although he slightly narrowed margins in rural counties compared with Mrs Hillary Clinton in 2016, Mr Trump, who barnstormed through the state's most conservative regions, brought out even more of his base.
In Washington County in south-west Pennsylvania, a region that benefited economically from fracking for natural gas, Mr Biden won a slightly larger share of the vote than Mrs Clinton did, 38 per cent versus 35 per cent.
But with overall turnout up significantly, Mr Trump won 9,300 more raw votes this year than he did in 2016, while Mr Biden added only 7,650 additional votes.
The pattern appears to have repeated across central Pennsylvania.
"There was no dropoff" for Mr Trump from 2016, said Mr Rob Gleason, a former chair of the state Republican Party, who lives in Cambria County in central Pennsylvania.
"It's pretty fantastic."
Mr Trump's votes in the county rose by 6,000 over 2016.
"He has a gift of getting people to be really for him," Mr Gleason said, describing the thousands who attended Trump rallies.
In Philadelphia, where the largest number of outstanding ballots in the state remained, election officials said they processed another 47,000 mail-in ballots on Wednesday, for a total of 233,486.
Ms Lisa Deeley, a city commissioner, said that 347,000 in-person ballots had been counted, or 97 per cent of those cast.
She had no estimate of when the city would finish counting.
Democrats in the city, who had hoped for a significant Biden win, were partly dejected by the closeness of the race.
Ms Fran Cardella, 77, a retired insurance industry worker in Philadelphia, said the narrowness most likely resulted from Mr Trump's large and frequent rallies in rural Pennsylvania in the closing days.
A Biden voter, Ms Cardella said the conservative rural counties showed as much enthusiasm for Mr Trump as in 2016 when he won an unexpected, narrow upset in the state.
"I guess they like his rhetoric," she said.
For live updates and results, follow our US election live coverage.