(Bloomberg) -- The closely-watched Republican US Senate primary race in Pennsylvania between celebrity physician Mehmet Oz and former Bridgewater Associates Chief Executive David McCormick is too close to call and likely headed for a recount, the Associated Press said on Friday.

Oz and McCormick were locked in a close race that included conservative firebrand Kathy Barnette.

The AP said it would not declare a winner in the race until the likely recount is complete. The winner will face Democratic nominee John Fetterman, the commonwealth’s lieutenant governor who won his race while hospitalized after suffering a stroke and getting a pacemaker implanted.

Unless waived by the candidates, a recount is automatically held in statewide races in Pennsylvania if the final unofficial margin falls within 0.5% of the total vote. The unofficial 1,079-vote margin between Oz and McCormick with 99% of the vote counted meets that requirement.

Acting Secretary of the Commonwealth Leigh Chapman has said she’d have a good sense about whether there’ll be an automatic recount by Tuesday, when counties send in their unofficial returns. Chapman would order the recount by 5 p.m. on May 26, and counties would have to complete it by June 7. 

Both Oz are girding for a long legal fight and assembling teams of lawyers. Since the commonwealth’s recount law was implemented in 2004, there have been three automatic statewide recounts and three times they were waived, Chapman said. All three recounts produced the same result, according to the Department of State.

The count in the Senate race unfolded slowly in part because of the state law that doesn’t let counties start processing mail-in ballots until 7 a.m. on Election Day, and about 22,000 ballots in Lancaster County had to be manually marked for scanning after a printing error made them unreadable.

Both McCormick and Oz had told their supporters on Tuesday night that the result of the race would be delayed, and both expressed confidence that they would win when all the ballots were counted.

©2022 Bloomberg L.P.