(Bloomberg) -- Pennsylvania’s dramatic Republican US Senate primary was too close to call early Wednesday with celebrity physician Mehmet Oz holding a razor-thin lead over former Bridgewater Associates Chief Executive Officer David McCormick. 

Oz, who was endorsed by former President Donald Trump, led by 978 votes as of 12:53 a.m. New York time, and had 31.2% of the vote to McCormick’s 31.1%, according to the Associated Press. Conservative firebrand Kathy Barnette, who roiled the campaign with a surge in its closing days, lagged with 24.8%. 

Pennsylvania law doesn’t allow counties to begin processing and counting mail-in and absentee ballots until 7 a.m. on Election Day, and there were 636,305 ballots returned across the commonwealth at the end of the day Monday, according to the Pennsylvania Department of State.

Several thousand mail-in ballots in Lancaster County have to be manually marked and rescanned after a printing issue made them unreadable, extending the vote counting process, officials said Tuesday.

Pennsylvania law requires an automatic recount in statewide races when the margin is less than or equal to 0.5% of the total vote. Candidates can also request a recount through the courts.

Both McCormick and Oz addressed their election night gatherings, acknowledging that there wouldn’t be an immediate conclusion. 

“Unfortunately, we’re not going to have resolution tonight, but we can see the path ahead. We can see victory ahead,” McCormick said, adding that “tens of thousands” of mail-in ballots were still to be counted, beginning on Wednesday.

Oz made similar comments, saying “we’re not going to have a result tonight. When all the votes are tallied, I am confident we will win.” 

Among those the celebrity doctor thanked were Fox News host Sean Hannity, who endorsed him, and “45, President Trump” for his support and continuing to lean into the race by doing calls and holding a rally for him on May 6 in southwestern Pennsylvania.

“God bless you ,sir, for putting so much into this race, I’ll make you proud,” Oz said.

The outcome of the 2020 presidential election in Pennsylvania was delayed for days as counties finished counting a flood of mail-in ballots cast because of the coronavirus pandemic. County officials have pleaded with state lawmakers to allow them to begin processing mail-in ballots earlier as Florida and other states do, but they have refused.

While Republicans are favored to take over the US House in this year’s midterm elections in part because of soaring inflation and President Joe Biden’s low approval ratings, Democrats have targeted the Pennsylvania seat of retiring Republican Senator Pat Toomey to perhaps maintain control of the chamber.

The winner of the Republican primary will face Democratic nominee John Fetterman, the Keystone State’s lieutenant governor, who easily won his race while hospitalized. Fetterman announced on Sunday he was being treated for a stroke and had a pacemaker installed on Tuesday.

The 6-foot-8, gym-shorts-wearing candidate made a brief video appearance from his hospital room at the election night party, where his wife, Gisele, addressed the crowd.

Biden issued a statement lauding Fetterman’s victory, saying “Democrats are united around John, who is a strong nominee, will run a tough race, and can win in November.

The Republican Senate primary had been in flux for weeks as polls showed that it had become a three-way heat among Oz, McCormick and Barnette. Barnette also addressed her election night event, saying that the race hadn’t yet been called as she attacked her critics.

Oz and McCormick, with their allies spent more than $54 million on ads -- a record for a Senate primary in the commonwealth.

Mastriano and Shapiro

In Pennsylvania’s governor’s race, Trump-endorsed state Senator Doug Mastriano, a staunch supporter of the former president’s false 2020 election claims, won the Republican primary with 42.6% of the vote. 

Democrat Josh Shapiro, Pennsylvania’s attorney general, ran unopposed in the primary. Shapiro announced on Tuesday that he had tested positive for the coronavirus.

There were also primaries Tuesday in Idaho, Kentucky and Oregon. In North Carolina, scandal-plagued Republican Representative Madison Cawthorn narrowly lost his bid for a second term to State Senator Chuck Edwards, despite Trump’s last-minute plea to North Carolina voters to give Cawthorn a “second chance.” 

In North Carolina’s general election for a US Senate seat, Representative Ted Budd, also backed by Trump, will face Cheri Beasley, a former state Supreme Court justice. 

©2022 Bloomberg L.P.