With a fight being waged over whether a statewide recount will take place in Pennsylvania, President-elect Donald Trump's lead in the commonwealth narrowed by some 22,000 votes as counties continued to count votes from last month's presidential election.

State election officials said Friday evening that Trump now led Democratic challenger Hillary Clinton by 49,000 votes, down from 71,000 as provisional and absentee ballots from overseas are recorded.

The revised vote total was released as Green Party candidate Jill Stein mounted a recount effort in the state. Officials in Philadelphia approved requests to re-check results of a series of machines, but a statewide review remains up in the air.

A court hearing is being held on Monday in Harrisburg that could decide whether a full recount could take place.

Pennsylvania was a key battleground state that helped Trump, the real estate mogul turned first-time politician, secure The White House.

Out of 6 million votes cast in Pennsylvania, the latest tallies put Trump's lead at 0.8 percent. State law would've required an automatic statewide recount if the lead was within 0.5 percent.

Earlier Friday in Philadelphia, where Clinton defeated Trump by a margin of nearly 455,000 votes, election officials checked electronic voting machines from 75 of the city's nearly 1,700 wards. Voters in each of the wards in question petitioned for the recount.

The survey, which began around 1 p.m. at the voting machine warehouse along Wissahickon Avenue, was monitored by city commissioners, Stein supporters and representatives from the Republican party.

[NATL] Seen in Trump's Orbit: Jared Kushner, Jack Ma

To re-check the results, a vote tally is printed out of each machine and evaluated. There are normally two machines per ward.

"We certified the election results. We're doing the exact same thing we did in the computation process. We're just doing it once again," said City Commissioner Al Schmidt, a Republican.

Stein supporters were critical of the recount process, however. Rich Garella said he asked for a review of the software running the election machines. That request was denied. City officials said the code didn't allow for it.

"The electronic result and the paper result come from the same source so this is like wanting to get a second opinion and going back to the same doctor," Garella said.

Schmidt, the city commissioner, said late Friday that no votes were changed as a result of the recount.

As for the fate of a statewide effort, attorneys for the Republican party plan to argue Stein's campaign has offered no evidence of hacking or vote tampering in Pennsylvania.

Pennsylvania Secretary of State Pedro Cortes, a Democrat, has said there's no evidence of irregularities or cyberattacks related to the election.

"I hope that once the public hears that the counting was done correctly this will wrap up pretty quickly," said Jonathan Goldstein, an attorney for the Republican Party of Pennsylvania.

Stein’s campaign has pushed for recounts in Michigan and Wisconsin as well. A recount began Thursday in Wisconsin and could begin next week in Michigan.

Trump won all three states, which are considered Democratic strongholds. Stein said if there's no check, doubt would persist as to whether tampering took place.

A recount or the newly tallied votes from paper ballots aren't expected to change the outcome of the election. Douglas Hill of the County Commissioners Association of Pennsylvania said there aren't enough uncounted ballots outstanding to flip the state.

Final counts are still outstanding in several counties including Allegheny County, which is highly populated and home to Pittsburgh.