Matt Slocum/AP
Chester County, Pennsylvania election workers process mail-in and absentee ballots at West Chester University in West Chester, Pennsylvania on November 4.
Harrisburg, Pennsylvania AP  — 

Pennsylvania voters could have their mail-in ballots thrown out if they do not write accurate dates on envelopes they use to return them under a state Supreme Court ruling issued Friday that could impact the presidential race.

The state’s high court ruled on procedural grounds, saying a lower court that found the mandate unenforceable should not have taken up the case because it did not draw in the election boards in all 67 counties. Counties administer the nuts and bolts of elections in Pennsylvania, but the left-leaning groups that filed the case only sued two of them, Philadelphia and Allegheny counties.

Commonwealth Court two weeks ago had halted enforcement of the handwritten dates on exterior envelopes. The Supreme Court’s reversal of that decision raises the prospect that thousands of ballots that arrive in time might get thrown out in a key swing state during what is expected to be a close presidential contest.

Far more Democrats than Republicans vote by mail in Pennsylvania. In recent elections, older voters have been disproportionately more likely to have had their mail-in ballots invalidated because of exterior envelope date problems.

The justices ruled 4-3, with two Democrats joining both Republicans on the Supreme Court to vacate the Commonwealth Court decision.

The dissent by three other Democratic justices said the high court should have taken up the dispute.

“A prompt and definitive ruling on the constitutional question presented in this appeal is of paramount public importance inasmuch as it will affect the counting of ballots in the upcoming general election,” wrote Justice David Wecht. He and the two other dissenters would have ruled on the matter based on written briefs.

The lawsuit, brought in May, argued that the mandate was not enforceable under a state constitutional provision that says all elections are “free and equal.”

Based on recent Pennsylvania elections, more than 10,000 ballots in this year’s general election might be thrown out over bad or missing envelope dates, which could be enough to swing the presidential race. Pennsylvania’s 19 electoral votes make it the largest prize among the seven swing states.

Pennsylvania voters will also decide whether to replace incumbent US Sen. Bob Casey, a Democrat, with Republican challenger Dave McCormick. Also on the ballot are 228 state legislative contests and elections for state treasurer, auditor general and attorney general.

Messages seeking comment were left for lawyers on both sides of the case.