(WHTM) – The Pennsylvania Department of State, which oversees statewide elections, has issued guidance telling counties to count updated or misdated mail-in ballots that arrived prior to the election night deadline.

The guidance comes amid a tightening Pennsylvania U.S. Senate primary between Mehmet Oz and Dave McCormick that is likely headed to a recount.

Ballots that were affected were set aside by county election officials and must now be opened in an open meeting with a representative from each candidate and political party permitted to watch.

Get daily news, weather, breaking news and alerts straight to your inbox! Sign up for the abc27 newsletters here

Mail-in and civilian absentee ballots that comply with the Election Code and the Department’s prior guidance shall be canvassed as follows:

• Ballots on which the Declaration Envelopes are signed are valid and must be counted.
• Ballots that are signed and either undated or incorrectly dated are valid and must be counted.
• County boards of elections must maintain separate counts for undated and incorrectly dated

PA Dept. of State

No challenges by authorized representatives or any third party are permitted during the canvassing of the mail-in and absentee ballots.

The full guidance can be reviewed below:

As of 11 a.m. on Tuesday, one week after the primary election, Oz leads McCormick by 983 votes.

On Monday McCormick’s campaign filed a lawsuit asking that all of the undated ballots be counted.

“I’m willing to accept whatever the results will be as long as every vote is counted and that’s what I’ll be fighting for,” McCormick said to abc27’s Dennis Owens on Monday. “I’m confident if we count every Republican vote that’s gonna be beneficial to me and I will prevail.”

It’s not clear how many mail-in ballots that lack a handwritten date have been received by counties. Although he trails the vote count, McCormick has been doing better than Oz among mail-in ballots.

Oz denied repeated interview requests by abc27, but his campaign tweeted in part, “Our campaign will oppose the McCormick team’s request that election boards ignore both the Pennsylvania Supreme Court and state election law and accept legally rejected ballots.”

A statewide recount will be ordered if the vote comes within 0.5%, which it has remained within since late on election night. The latest a winner could be declared would be June 8.

Get daily news, weather, breaking news and alerts straight to your inbox! Sign up for the abc27 newsletters here

Ruling in a separate case late Friday, the 3rd U.S. Circuit Court of Appeals said the state election law’s requirement of a date next to the voter’s signature on the outside of return envelopes was “immaterial.” The lawsuit emerged from a county judicial election last year, and the three-judge panel said it found no reason to refuse counting the ballots in that race.

The ruling went against the position that Republicans in Pennsylvania have taken in courts repeatedly in the past to try to disqualify legal ballots cast on time by eligible voters for technicalities, such as lacking a handwritten date.

The law requires someone to write a date on the envelope in which they mail in their ballots. However, the envelope is postmarked by the post office and timestamped by counties when they receive it.

Meanwhile, the state law gives no reason that a voter should date the envelope and does not explicitly require a county to throw it out should it lack a date.

This is a developing story. Stay updated on the latest from abc27 News

The Associated Press contributed to this report