The legal fight for every single vote in Pennsylvania’s Republican Senate primary has begun.

Armies of attorneys representing David McCormick and Mehmet Oz, separated by a razor-thin margin in the ongoing vote count, had been descending on the state when a federal appeals court jolted the process Friday.

Shortly after 4 p.m., the court ruled that undated mail ballots from Lehigh County in last fall’s election should be counted. That sent counties and campaigns scrambling because state courts had previously held that Pennsylvania law required voters to date their ballots or have them thrown out.

Less than 90 minutes later, the McCormick campaign sent an email blast to lawyers for the state and all 67 counties.

“We trust that in light of the Third Circuit’s judgment you will advise your respective boards to count any and all absentee or mail-in ballots that were timely received but were set aside/not counted simply because those ballots lacked a voter-provided date on the outside of the envelope,” wrote attorney Ron Hicks. “To the extent you are not willing to provide this advice, we ask for a formal hearing before your boards on this issue.”

Hicks is one of Pennsylvania’s top Republican election lawyers. He and his firm, Porter Wright Morris & Arthur, represented the campaign of then-President Donald Trump as he fought his loss in 2020. Hicks helped file a lawsuit aimed at stopping certification of the results in Pennsylvania before abruptly withdrawing from the case — and from representing Trump — days later.

Both the Oz and McCormick campaigns have brought in small armies of lawyers in recent days. But as they geared up for a bruising legal fight, they did not attack the legitimacy of the votes or the process of counting them, a dramatic contrast to the way Trump and his allies smeared the process in 2020.

As of Saturday afternoon, with more than 1.34 million votes counted in the race, Oz had 1,070 more counted votes than McCormick — a difference of less than 0.08% of the vote. By law, a difference of 0.5% or less would trigger a recount.

“David McCormick has been a formidable opponent, but it is becoming obvious that he is likely going to come up short to Dr. Mehmet Oz,” Oz campaign manager Casey Contres said in a statement Saturday.

As the vote count continued, Contres said, the Oz team would fight the McCormick campaign’s attempt to get undated mail ballots counted.

What to expect from the fight over every vote

In any close race, the trailing candidate, in this case McCormick, needs to find all possible votes to add to the count.

For the candidate in the lead — Oz, in this instance — the goal is the opposite. Oz wants the count to end with him on top.

McCormick will in particular want to count mail ballots: In-person votes have slightly favored Oz, while mail ballots have helped McCormick. (McCormick has won about seven mail votes for every five that Oz has.)

Campaigns can begin fighting over ballots even before the recount would be officially declared next week.

As the final votes are tallied — counties are required to submit unofficial, as-close-to-final-as-possible results to the Pennsylvania Department of State by 5 p.m. Tuesday — county elections officials will be making decisions as to which ballots to count or reject.

During the vote count, elections workers move as quickly as possible to count all the ballots they know they can, setting aside those with any defects for review. The contested ballots create opportunity for both campaigns when they’re adjudicated by county officials.

After two years of expansive mail voting, many of those decisions are largely settled — counties reject unsigned ballots, for example, or “naked ballots” that arrive without a secrecy envelope — but voters create new questions every election. The campaigns can challenge counties’ decisions to count or reject those ballots, and then appeal them to county courts.

Similarly, the campaigns will be able to challenge decisions during a recount, including arguing that the county is misinterpreting voters’ intent, rejecting legitimate votes, or accepting illegitimate ones.

Outside of the county-by-county fight, the campaigns may also opt for statewide litigation, such as by arguing that a patchwork of county policies violates the U.S. Constitution. And one set of lawyers hired by the Oz campaign is also involved in the Lehigh County case, so they could potentially ask the U.S. Supreme Court to block the appeals court ruling.

Both the McCormick and Oz campaigns have been probing the vote-count process, asking counties questions about how they’ve counted votes and how they made decisions about which to count or reject. In Allegheny County, for example, representatives from both campaigns observed the final stage of tallying in-person and mail ballots Friday, and both asked to examine undated or unsigned ballots when county officials reconvene Monday.

Those undated mail ballots have suddenly taken center stage.

How Friday’s court decision supercharged the fight

The U.S. Court of Appeals for the Third Circuit ruled Friday that undated Lehigh County mail ballots from last November’s election should be counted.

It did not immediately issue an opinion, but the text of the order, several lawyers from both political parties said, meant counties suddenly could — or perhaps even should — count undated mail ballots.

» READ MORE: Federal appeals court says undated Pa. mail ballots should be counted, a decision that breaks with state courts and could have immediate impact

State law’s requirement that voters date their ballots — which state courts had said meant undated ballots should be rejected — isn’t actually used in determining whether a vote is legitimate, the judges ruled. That makes the requirement a technicality that, if used to reject ballots, violates the Civil Rights Act.

Hicks attached a copy of the order in his email to the county solicitors. As he described it: “The Third Circuit determined that the lack of a voter-provided date on the outside of an absentee or mail-in ballot envelope cannot prevent that ballot’s counting because the lack of that date on an indisputably timely ballot is immaterial under federal law.”

On Saturday, Contres countered that “our campaign will oppose the McCormick legal team’s request that election boards ignore both Pennsylvania’s Supreme Court and state election law and accept legally rejected ballots.”

The fight over mail ballots now puts McCormick in the position of being a Republican defending a voting method that the GOP has spent the last two years attacking. Trump’s lies about election rigging and fraud have pushed Republicans to generally avoid voting by mail.

» READ MORE: There’s another high-profile vote count in Pa., but Republicans aren’t objecting this time

“Unfortunately, the McCormick legal team is following the Democrats’ playbook,” Contres said in the statement.

Asked about its request, a spokesperson said the McCormick campaign is “glad that Republican primary votes — including active-duty military votes — continue to be counted.”

Staff writer Julia Terruso contributed to this article.