(Bloomberg) -- Former Bridgewater Associates Chief Executive David McCormick sued county election boards in Pennsylvania seeking an order to compel them to count some absentee and mail-in ballots that were rejected in his too-close-to-call Republican US Senate primary with celebrity physician Mehmet Oz.

Lawyers representing McCormick’s campaign said they filed the lawsuit in the Commonwealth Court of Pennsylvania on Monday to count absentee and mail-in ballots that voters submitted on time but without a required handwritten date on an outside envelope. The lawsuit wasn’t immediately available on the court’s website.

In the lawsuit, the campaign cites a federal appeals panel ruling last Friday that such ballots can’t be rejected solely because the envelopes for the ballots don’t include a handwritten date.

“Because all ballots are time stamped by the County Boards of Elections on receipt, a voter’s handwritten date is meaningless,” Chuck Cooper, chief legal counsel for the McCormick campaign, said in a statement. “All timely ballots of qualified Republican voters should be counted.”

The Oz campaign has opposed the counting of undated mail-in ballots, saying the appellate ruling didn’t specify it applied to the May 17 primary and that the ballots should be rejected under current law.

Oz led McCormick by fewer than 1,000 votes as of 8:03 p.m. on Monday with 99% of the vote counted, according to the Associated Press. That falls within the margin that would trigger an automatic recount, and the AP has said it would not declare a winner in the race until a likely recount is complete.

It’s not clear how many undated absentee and mail-in ballots there are. The Pennsylvania Department of State said as of 2 p.m. Monday, there were about 5,400 Republican ballots outstanding that likely include the rejected ballots.

Pennsylvania counties have until 5 p.m. Tuesday to report their unofficial totals, and Acting Secretary of the Commonwealth Leigh Chapman would order the recount by 5 p.m. on Thursday if the margin falls within 0.5% of the total vote. Counties would have to complete the recount by June 7.

Both Oz and McCormick are girding for a long legal fight and assembling teams of lawyers in a critical race that will help determine party control of the US Senate. The winner of the Republican primary will face Democratic nominee John Fetterman, the commonwealth’s lieutenant governor.

©2022 Bloomberg L.P.