Many across the country -- and certainly former President Donald Trump -- are watching Pennsylvania.
Ballots are still being counted in the GOP Senate primary race, where razor-thin margins separate hedge fund manager David McCormick and celebrity TV Dr. Mehmet Oz. Meanwhile, a late Trump endorsement in the Republican gubernatorial primary helped boost election denier and state Sen. Doug Mastriano to a win. Both races offer insight -- and raise tough questions -- about the conservative electorate in the Keystone State.
As of Wednesday afternoon, with 98% of votes counted, both McCormick and Oz had roughly 31% -- separated by just about 2,000 votes. Pennsylvania law triggers a recount if a candidate's margin of victory is 0.5% or less, as seems all but certain.
Here's what happening in Senate contest and what to know about the gubernatorial win.
What's next for Oz and McCormick?
Only about 2% of ballots in the GOP Senate primary remain to be counted. But in a squeaker like this, those 2% are key.
Many counties in Pennsylvania don't start counting mail-in ballots until Election Day, so there are still enough outstanding votes across the state's 67 counties to be tabulated and counted that a result cannot yet be projected.
Raising another issue, in Lancaster County, "about 22,000 mail ballots were printed by the print vendor with the incorrect code and could not be read by the county's scanners," the secretary of state's office told ABC News on Tuesday night. County election officials were in the process of re-marking and scanning the ballots by hand, which will likely take a few days.
If the margin demands a recount when all votes are in, the secretary of state will initiate that process.
Trump, taking a page out of his own playbook and refusing to wait for every vote to be counted, on Wednesday publicly urged Oz to "declare victory." Trump continued to sow doubt in the election results to come, using his social media app, Truth Social, to again attack mail-in ballots.
Republicans have been reluctant to rely on that voting method in the last two years -- repeatedly criticizing and undercutting an option that millions of Americans relied on at the height of the COVID-19 pandemic, despite any evidence of widespread fraud. But a key race still counting them is forcing patience within the party.
The combination of mail-in ballots trailing in and printing errors is, in part, what's causing the delayed result on the McCormick-Oz contest. But another factor was the ascendance of far-right conservative commentator Kathy Barnette -- over Trump's objections.
Barnette -- who was at Trump's rally on Jan. 6, 2021, and was seen walking with others to the U.S. Capitol before the deadly rioting (in which she has denied participating) -- saw a surge in support in the last few weeks and appeared to split votes among Trump's base and away from Oz and McCormick. As of Wednesday afternoon, she had about 25% of the votes compared to the others' 31% each, highlighting how unusually fractured GOP primary voters were.
In the days leading up to the primary, Trump came after Barnette, saying that she would not be able to win the general election against the Democratic nominee (who ended up being Lt. Gov. John Fetterman). He also swiped at her background, saying that "she has many things in her past which have not been properly explained or vetted." Barnette told NBC News Trump had to say that because "he's going to stick with that endorsement."
But during Trump's rally in Pennsylvania earlier this month, intended to bolster Oz, voters on the ground expressed skepticism, citing Oz's changing stances on COVID vaccines, abortion access and the Second Amendment. Instead, many told ABC News, they would prefer Barnette, calling her a true conservative.
"MAGA ["Make America Great Again"] does not belong to President Trump," Barnette said at a debate last month. "MAGA -- although he coined the word -- MAGA is actually, it belongs to the people."
Without Barnette's success, it's likely that either McCormick or Oz would have more decisively won the race, avoiding the potential for a recall while Republicans would prefer to be able to turn toward the upcoming general against Fetterman.
The Senate seat that Oz and McCormick are vying for is currently held by retiring Republican Sen. Pat Toomey. It would be a significant loss to the GOP -- and a critical gain for Democrats who hope to maintain their slim control in the 50-50 Senate.
Trump announced his endorsement of Oz in April, citing the latter's popularity and past compliments on Trump's health. He argued that Oz would be the one most likely able to win in November's midterms. But McCormick, the hedge fund owner from Connecticut endorsed by Texas Sen. Ted Cruz, and whose wife worked in the Trump administration, drew many votes even without Trump's coveted support.
In a call with ABC News on Tuesday, McCormick struck a delicate balance of complimenting Trump while arguing his endorsement didn't matter in the race.
Both McCormick and Oz spoke at their respective election night parties and acknowledged that their race was too close to call.
"We're not going to have resolution tonight, but we can see the path ahead," McCormick said.
Oz, appearing minutes after, first thanked Trump for his endorsement and then Fox News host Sean Hannity for his "behind-the-scenes" advice.
"We're not going to have a result tonight. When all the votes are tallied, I am confident we will win," Oz said.
Whoever wins the Republican primary will face Fetterman, who has campaigned with a distinctly blue-collar bent and an everyman affect -- tall, bald and tattooed, more often in a shirt and shorts than a suit. He soared to a wide victory in the Democratic race over the more moderate Rep. Conor Lamb, even as he underwent surgery on primary day to get a pacemaker with defibrillator after he suffered a stroke last Friday. His campaign said Tuesday that the procedure was successful and he was recovering in the hospital.
Trump vaults Mastriano to victory, with a Democratic assist
Pennsylvania's Republican gubernatorial primary shifted dramatically in the final days of the election after Trump interjected and endorsed Doug Mastriano, who had attracted conservative grassroots support for his efforts to try to overturn the state's 2020 presidential result. Mastriano's win has raised concerns about the state's future election integrity, since Pennsylvania's governor appoints the secretary of state, the chief officer in charge with overseeing elections.
The state senator and retired Army colonel organized buses to the "Stop the Steal" rally on Jan. 6 and was seen on camera walking past barricades at the Capitol ahead of the rioting later that day. The House's Jan. 6 committee has subpoenaed him, given that he was in communication with Trump, but neither he nor the committee has confirmed whether he complied with the order. He has denied participating in any violence.
Establishment Republicans worried about Mastriano getting the nomination, given how his baseless claims about the 2020 election might play with the wider electorate. Two GOP candidates in the governor's race, Melissa Hart and Jake Corman, dropped out in the last stretch in an effort to consolidate votes around Rep. Lou Barletta instead of Mastriano.
Democrats, however, hoped for Mastriano's win, believing him easier to beat in November.
Pennsylvania Attorney General Josh Shapiro, who ran unopposed for the Democratic nomination, branded Mastriano as Trump's pick so that he could stand out from the GOP crowd. But Republican political strategist Amanda Carpenter, who condemned Mastriano as "an insurrectionist" in a column for the website The Bulwark, also said his win should provide a lesson to Democrats, especially those who wanted Trump to face Hillary Clinton in the 2016 presidential election for similar reasons.
"Hoping that Democrats will solve the problems of the Republican party has been a grave mistake. It's not often countries get second chances," she wrote. "But if the GOP now gets behind insurrectionists like Mastriano, it's January 6th forever."
ABC News' Hannah Demissie, Oren Oppenheim and Alisa Wiersema ontributed to this report.