This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

HARRISBURG, Pa. (AP) — Some of Pennsylvania’s largest counties scrambled Monday to help voters fix mail-in ballots that have fatal flaws such as incorrect dates or missing signatures on the envelopes used to send them in, bringing about confusion and legal challenges in the battleground state on the eve of the election.

Elections officials in Philadelphia and Allegheny County, which includes Pittsburgh, announced measures they were taking in response to state Supreme Court rulings in recent days that said mail-in ballots may not be counted if they lack accurate handwritten dates on the exterior envelopes.

Ahead of Tuesday’s midterms, more than a million mail-in and absentee ballots have already been returned in Pennsylvania, with Democrats far more likely than Republicans to vote by mail. The numbers are large enough that they might matter in a close race, such as the contest between Democrat John Fetterman and Republican Mehmet Oz that could determine majority control of the U.S. Senate.

The Department of State said it was unclear just how many ballots are at issue across the state. The agency over the weekend asked counties to provide the numbers, broken down by political party. Officials said some counties were not letting voters fix their mistakes.

Lines formed at City Hall in downtown Philadelphia on Monday and over the weekend with voters waiting to correct their ballots. Some people on social media said the office did not get to everyone Monday.

The Pennsylvania litigation was filed by Republican groups and is among legal efforts by both political parties in multiple states to have courts sort out disputes over voting rules and procedures ahead of the midterm election.

A new federal lawsuit over the envelope dates was filed Monday in Pittsburgh federal court by the national congressional and senatorial Democratic campaign organizations, two Democratic voters and Fetterman’s U.S. Senate campaign. They sued county boards of election across the state, arguing that throwing out ballots that lack proper envelope dates would violate a provision in the 1964 U.S. Civil Rights Act that says people can’t be kept from voting based on what the lawsuit calls “needless technical requirements.”

A separate federal lawsuit filed Friday makes a similar argument.

In Wisconsin, the Republican chair of the state Assembly’s elections committee, along with a veterans group and other voters, filed a lawsuit Friday seeking a court order requiring the sequestering of military absentee ballots in the battleground state. The lawsuit seeks a temporary injunction requiring elections officials in Wisconsin to set aside military ballots so their authenticity can be verified.

A judge Monday refused that order.

Also on Monday, in Arizona, a judge blocked Cochise County’s plan to conduct a Republican effort to count all ballots by hand. The lawsuit aimed to stop the county board of supervisors from expanding what is normally a small hand tally used to verify machines’ accuracy to include all early ballots and all Election Day ballots as well.

A challenge against voting by absentee ballot in Detroit was also thrown out Monday after a judge ruled that a Republican candidate for secretary of state “failed dramatically” to produce any evidence of violations in the majority-Black city.

Pennsylvania’s acting secretary of state, Leigh Chapman, on Monday urged mail-in voters who think they may have made technical errors to contact their county elections offices. If the county won’t let them fix the problem, they should go to their local polling place on Tuesday and request a provisional ballot, she said.

In Allentown, Lehigh County officials reached out to all the voters they could locate whose ballots have problems, election director Tim Benyo said Monday. He said there are a few hundred ballots at issue.

“People have been very interested in curing their ballots,” Benyo said. “We’ve been busy.”

Allegheny County elections officials posted online the names and birth years of voters who have sent in ballots in envelopes that either lack any date or are dated outside the permissible range of Sept. 19-Nov. 8 for mail-in ballots and Aug. 30-Nov. 8 for absentee ballots. Those voters can fix their ballots in person at the elections office Monday or Tuesday, or vote provisionally at their regular polling places.

Allegheny reported that, as of Sunday, more than 600 incorrectly and nearly 400 undated ballots had arrived to be counted. Philadelphia said it has received about 2,000 undated ballots and several hundred more that appear to have been incorrectly dated.

Philadelphia Deputy Commissioner Nick Custodio said the court decision last week and the tide of ballots rolling in ahead of Election Day has made it difficult to issue direct notifications.

“So far we have only been able to put out a list on our website, but we are exploring whatever other options are available given the short time-period,” Custodio said.

Dozens of voters seeking to fix their ballots showed up at City Hall over the weekend, and Custodio said more visited city offices Monday. Volunteers from several groups are contacting those voters to see if they need help getting to the elections office.

A judge in Monroe County, a swing region in eastern Pennsylvania’s Pocono Mountains, on Monday denied a Republican request to stop efforts by county election officials to notify voters about defective absentee and mail-in ballots and give them a chance to fix them.

The Pennsylvania Supreme Court ruled Tuesday that mail-in votes do not count if they are “contained in undated or incorrectly dated outer envelopes,” then supplemented that with a follow-up order on Saturday that specified the allowable date range for mail-in and absentee ballots.

Ballots without properly dated envelopes have been the topic of litigation since mail-in voting was greatly expanded in Pennsylvania under a state law passed in 2019.

Mail-in ballots must be received by 8 p.m. Tuesday, so at this point officials are urging people who have not done so to deliver them to elections offices or drop boxes by hand.

___

This story has been corrected to say mail-in ballots must be received by 8 p.m., not 8 a.m.

___ AP reporters Scott Bauer in Madison, Wisconsin, Bob Christie in Phoenix and Claudia Lauer in Philadelphia contributed to this story.

___

Learn more about the issues and factors at play in the midterms at https://apnews.com/hub/explaining-the-elections. And follow the AP’s election coverage of the 2022 elections at https://apnews.com/hub/2022-midterm-elections.