HARRISBURG, Pa. (AP) — A Pennsylvania court hearing Thursday will address the fate of some 800 mail-in spring primary votes that three Republican-majority county election boards threw out over the lack of handwritten dates on their outside envelopes.

The dates aren’t needed to show the ballots were mailed in time — county workers must separately verify that they were received by the time polls closed on election day — but are required by Pennsylvania election law for mail-in ballots being tallied by county election officials.

The lawsuit was filed this month against Berks, Fayette, and Lancaster counties by the Pennsylvania Department of State asking the Commonwealth Court to force the counties to add those votes to their final counts.

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

A document filed with the court Tuesday showed the decision to not count the votes involved more Democratic votes than Republican. Berks County threw out 507 Democratic and 138 Republican ballots, Fayette 45 Democratic and six Republican, and Lancaster 46 Democratic and 38 Republican.

The state Supreme Court ruled in 2020 that the date mandate did not apply for that fall’s election only. This year, failed GOP Senate candidate David McCormick sought to have ballots without the date counted and won a court order that counties tally them up separately, but he withdrew his lawsuit and conceded the race. In May, the 3rd U.S. Circuit Court of Appeals said handwritten dates on exterior envelopes were not required in a 2021 Lehigh County judicial election.

The case is one of several lawsuits over mail-in voting in Pennsylvania, as Republicans have pushed to limit its use while Democrats embraced the system during the pandemic. A legal challenge to the 2019 law that greatly expanded mail-in voting in Pennsylvania is currently pending before the state Supreme Court, and another was recently filed.

The Department of State and acting Secretary of State Leigh Chapman under Democratic Gov. Tom Wolf are seeking an order to force Berks, Fayette, and Lancaster to include in their primary election tallies all absentee and mail-in voters, “even if the voter failed to write a date on the declaration printed on the ballot’s return envelope.”

Recent filings by Jeffrey Bukowski, a lawyer for Berks and Lancaster, said the 3rd Circuit decision was not in effect when counties faced a deadline to report and that Chapman lacks the legal authority to force counties to certify votes from the undated envelopes.

Bukowski told the court that Chapman and the Department of State were trying to make themselves “overseers of Pennsylvania elections who can enact policies outside of the legislative process that arguably favor certain candidates and dictate election results to the various county boards of elections.”

Get the latest Pennsylvania politics and election news with abc27 newsletters!

Fayette County’s lawyers argued in a July 19 filing that Chapman and her agency were taking a legal position that is “breathtakingly broad and dangerous for future elections,” where they could end up as “sole auditor of elections.”