PHILADELPHIA — Joseph R. Biden Jr. took the lead over President Trump in Pennsylvania on Friday morning as Democrats grew increasingly confident that he would win the state and with it the presidency: The state’s 20 electoral votes would put Mr. Biden, who has 253 electoral votes, past the 270-vote threshold for victory.
By late Friday morning, after more votes were counted from Philadelphia and other counties that have supported Mr. Biden, he led Mr. Trump by more than 13,000 votes.
Mr. Biden had steadily erased Mr. Trump’s early lead in the state — at one point, the president led by half a million votes — as ballots, mostly absentee and mail-in votes, were counted over the past few days. Most of the remaining uncounted votes in the state are in Democratic-leaning areas.
At a news conference on Friday afternoon, Philadelphia elections officials said that they would have another update of 2,000 to 3,000 ballots on Friday afternoon, and that they had about 40,000 ballots left to count in the city.
The remaining ballots “generally fall into one of three categories: those that require a review, provisionals and U.S. military overseas ballots,” said Lisa Deeley, one of the city commissioners in Philadelphia in charge of elections. “I would estimate there’s approximately 40,000 remaining to be counted.”
“We can also tell you that it may take several days to complete the reporting of that,” Ms. Deeley added.
On Thursday, Kathy Boockvar, the Pennsylvania secretary of state, told CNN that the “overwhelming majority” of the state’s remaining votes would be counted by Friday.
Pennsylvania Democratic officials have said their analysis of the uncounted votes gave them confidence that Mr. Biden would win the state by a substantial margin.
“We believe when the votes are counted, it’s pretty clear that Joe Biden’s going to be president of the United States, because he’s going to win Pennsylvania,” said State Senator Sharif Street, the vice chair of the state Democratic Party, on Thursday.
Mr. Trump has baselessly insisted that post-Election Day tallies showing Mr. Biden leading in battleground states, including Pennsylvania, were the result of fraud, and has vowed to challenge them in court. His campaign showed no sign of an imminent concession Friday morning.
“The false projection of Joe Biden as the winner is based on results in four states that are far from final,” a lawyer for the Trump campaign said in a statement.
Mayor Jim Kenney of Philadelphia dismissed those accusations on Friday.
“While some including the President continue to spew baseless claims of fraud, claims for which his team has not produced one iota of evidence, what we have seen here in Philadelphia is democracy, pure and simple,” Mr. Kenney said.
Andrew Bates, a spokesman for the Biden campaign, said that if Mr. Biden won the election and Mr. Trump refused to concede, “The United States government is perfectly capable of escorting trespassers out of the White House.”