Updated

Democratic nominee Joe Biden steadily gained ground on President Trump in both Pennsylvania and Georgia as more mail votes were counted Thursday and overnight into Friday, inching the former vice president closer to the 270 electoral votes needed to win the presidency. 

In Georgia and Pennsylvania specifically, Biden now leads. Though with a razor-thin margin there, the Georgia secretary of state Friday said he expects a recount.

Biden sits at 264 electoral votes in states where races have been called while Trump has 214 in called races.

Biden needs just one win in any of the swing states with races that have not yet been called by the Fox News Decision Desk -- Nevada, Pennsylvania, North Carolina and Georgia -- while Trump would need to win all four of those states plus Alaska, which he is expected win but is too early to call because of a lack of votes reported. 

BIDEN OVERTAKES TRUMP IN GEORGIA COUNT AS TALLY NEARS COMPLETION

"We continue to feel very good about where things stand. We have no doubt that when the count is finished, Sen. Harris and I will be declared the winners," Joe Biden said in brief remarks on Thursday. "So I ask everyone to stay calm, all the people to stay calm. The process is working. The count is being completed, and we'll know very soon."

House Speaker Nancy Pelosi on Friday also predicted a victory for Biden despite the fact that the race has not yet been called: "This morning it is clear that the Biden-Harris ticket will win the White House."

Trump, meanwhile, accused Democrats of trying to "steal" the election in remarks he made from the White House.

"Our goal is to defend the integrity of the election, we will not allow the corruption to steal such an important election or any election for that matter," Trump said, though the only specific accusation of voter fraud his campaign has presented -- one woman in Nevada -- was disputed by the voter registrar in the county where the campaign made the allegation. 

His campaign also claimed broadly it is possible that thousands of people who no longer live in Nevada, citing "publicly-available data," voted improperly there. But the legal merits of its claims are disputed by liberal groups like the American Civil Liberties Union, which says laws around legal residency generally favor people who temporarily leave the state. A Fox News examination of votes the Trump campaign is claiming were cast illegally in Clark County, Nev., appears to reveal that many --though not necessarily all -- are military members on assignment to various bases around the country. Such military members are allowed to keep their residences and vote in their home states if they plan to return after their assignment. 

The Trump campaign also complained that it is not being given good enough access to observe votes being tallied in Michigan and Pennsylvania. It says it will demand a recount in Wisconsin, though it appears unlikely a recount could close the margin of about 20,000 votes between Trump and Biden there. 

Lawsuits by the Trump campaign were dismissed in Michigan and Georgia. But the Trump campaign got a favorable ruling on one issue from a judge in Pennsylvania. It required Philadelphia election officials to let GOP observers within 6 feet of workers counting ballots. But the campaign maintained the city was not following the ruling. And it lost a federal lawsuit asking for vote-counting in Philadelphia to stop. 

FEDERAL JUDGE DISMISSES TRUMP REQUEST TO STOP COUNTING PHILADELPHIA BALLOTS

"If you count the legal votes, I easily win. If you count the illegal votes, they can try to steal the election from us," Trump said Thursday evening. 

The Biden campaign has said the Trump legal efforts are "pathetic."

"This is not the behavior of a winning campaign," Biden spokesman Andrew Bates added. "Plain and simple, Donald Trump has lost Wisconsin, he is losing Michigan, and he is losing the presidency."

And Philadelphia election officials said that Trump continues to "spew baseless claims of fraud, things for which his team has not produced one iota of evidence."

Philadelphia City Commissioners Chairwoman Lisa Deeley, when asked about GOP claims that they have not been able to actually observe ballots that Philadelphia workers are counting, said, "we have a live stream, anybody can watch" and added that "there have been observers."

Here's where things stand in the major swing states that have not yet been called. 

Pennsylvania

Trump's lead in Pennsylvania was hundreds of thousands of votes after Election Day. But Democrats requested and returned mail ballots at a much higher rate than Republicans, which are being counted later because they are far more labor-intensive to count than in-person votes. 

Trump's lead continually narrowed over Wednesday and Thursday and as of Friday morning, Biden overtook the president in the key state. Biden lead over 13,000 votes with 98% reporting. Biden overtook Trump as a tranche of votes came in from Philadelphia county, bumping up its reporting numbers from 91% to 95%.

Most areas in the state, including conservative rural areas and Democrat-leaning suburbs, were reporting approximately 95% of votes or more as of  Friday afternoon. But the heavily Democratic Allegheny County, which encompasses Pittsburgh, was only reporting 90%

BIDEN TO RECEIVE ADDITIONAL SECRET SERVICE PROTECTION: REPORT

Biden's new lead, with more likely Democrat-leaning mail votes to be counted, puts him firmly in command in the state which for months has been considered the most important battleground in the 2020 election. 

Georgia

A similar situation existed in Georgia over Wednesday and Thursday, with Trump leading after Election Day but Biden closing the gap as more mail ballots are counted. 

And on Friday morning Biden officially overtook Trump in the vote total there, taking a more than 1,500 vote lead in the state with 99% of votes reporting. 

Georgia Secretary of State Brad Raffensperger said in a press briefing on Friday that there will be a recount in Georgia with the margin so close, and swore that the state would ensure its process is transparent and that any irregularities would be investigated. 

"The focus of our office and for the county election officials," Raffensperger said, is to ensure that "every legal vote" is "counted and recorded accurately.'

He added: "In Georgia, this process is and will remain open and transparent to monitors."

Raffensperger's office said that it is aware of 4,169 ballots that are yet to be counted as of Friday afternoon and that there are 8,890 outstanding military ballots that if received by the end of Friday may be counted. 

Nevada

Votes have come in slowly in Nevada, with 87% reporting as of Friday afternoon.

JOE BIDEN SAYS HE HAS 'NO DOUBT' HE WILL DEFEAT TRUMP WHEN VOTE COUNT IS FINISHED 

But Biden has maintained a lead in the state, which as of Friday afternoon was over 20,000 votes. That equates to 1.6%.

Votes that haven't been counted in Nevada come approximately uniformly from Republican-leaning and Democrat-leaning counties. 

If the Nevada race is projected for Biden it could make the tense vote counts in places like Pennsylvania and Georgia irrelevant, as its six electoral votes would give Biden exactly 270. 

North Carolina

Trump appears the strongest among the remaining battleground states in North Carolina. 

With 94% of the votes in as of Friday afternoon, the president leads by more than 76,000 votes in the state. 

CLICK HERE TO GET THE FOX NEWS APP

The static nature of the North Carolina race is unlikely to change until next week, Karen Brinson Bell, the executive director of the state elections board, said Thursday. She said with "very few exceptions would North Carolina's numbers move before the 12th or the 13th."

This is partially because the state accepts mail ballots that were sent by Election Day but arrive up to nine days later. County elections boards also have to handle provisional ballots. 

Democrats voted by mail in much larger numbers than Republicans this year. But Biden has a large Trump lead to overcome in North Carolina, though he does not need to win the state to win the presidential election.

Fox News' Sarah Tobianski, Jon Decker and Lee Ross contributed to this report.