Donald Trump rallies Pennsylvania Republicans against Dr. Oz challenger for Senate

NEWTOWN, PENNSYLVANIA - MAY 11: Pennsylvania U.S. Senate candidate Dr. Mehmet Oz speaks during a Republican leadership forum at Newtown Athletic Club on May 11, 2022 in Newtown, Pennsylvania. In the May 17 Republican primary to replace retiring Sen.

Sensing a threat in Pennsylvania’s U.S. Senate race, Donald Trump issued a warning Thursday that surging Republican candidate Kathy Barnette would upend the GOP’s chances of holding the seat in November and urged voters to back his pick, celebrity heart surgeon Mehmet Oz.

The former president’s statement echoed growing panic among his allies and Barnette's rivals over her sudden and unforeseen rise ahead of the state’s Tuesday primary.

Barnette "will never be able to win" in a general election matchup against Democrats, Trump said in a statement, adding that Oz "is the only one" who can defeat the Democratic nominee.

Later, on a telephone townhall with Oz, Trump criticized Barnette for losing a 2020 congressional race — by nearly 20 percentage points, albeit in a heavily Democratic district — and said he had never heard of her.

"And the problem is, nobody knows what she stands for, who she is and that’s very risky because you're going to win this with Oz and you're not going to win it with any of the other candidates," Trump said.

The seat is opening up with the retirement of second-term Republican Sen. Pat Toomey and is regarded as perhaps the best opportunity for Democrats to pick up a seat this year in the closely divided Senate.

Trump’s attacks reflected an 11th-hour behind-the-scenes scramble by Trump allies and rival campaigns to discredit Barnette, even though she has campaigned as a supporter of the former president and with promoters of his lies that massive voter fraud cost him a victory in the 2020 election.

Earlier Thursday, Barnette made the rounds of conservative broadcasters, suggesting on "The Water Cooler with David Brody" that Trump is attacking her because he knows she's going to win.

"It sounds like the president knows what's going to happen on next Tuesday," Barnette said.

She also reprised her campaign trail attacks on Oz and another candidate, hedge fund CEO David McCormick, criticizing their wealth and questioning their credentials as conservatives.

"We now have the opportunity where the people are making their voices heard on what kind of leadership they want — and they don't want to be spoon-fed two globalists, as many influencers within the Republican Party are trying to sell us, they want a real conservative," Barnette said.

GettyImages-1396765002.jpg

NEWTOWN, PENNSYLVANIA - MAY 11: Pennsylvania U.S. Senate candidate Kathy Barnette speaks during a Republican leadership forum at Newtown Athletic Club on May 11, 2022 in Newtown, Pennsylvania. In the May 17 Republican primary to replace retiring Sen.

Democrats are deciding among a four-person field including the state's elected lieutenant governor, John Fetterman, three-term U.S. Rep. Conor Lamb and state Rep. Malcolm Kenyatta. Fetterman, who comes from the party's progressive wing, has led polls and fundraising.

Pennsylvania’s Republican Senate primary had been primarily an expensive duel between Oz, best known as the host of daytime TV’s "The Dr. Oz Show," and McCormick.

Then, a surprise Fox News poll released Monday suggested a tight, three-way race with Barnette, who, if elected, would be the first Black Republican woman to ever serve in the U.S. Senate.

The poll found 22% of GOP primary voters supported Oz, with McCormick and Barnette bunched together at 20% and 19%. About one-fifth of voters, or 18%, said they were undecided.

Despite Trump's attack on Barnette, elements of the party's establishment were more accepting of Barnette, acknowledging that many Republican voters weren't sold on Oz or McCormick.

RELATED: 2022 Midterm Elections: Everything you need to know

She had a strong showing at recent TV debates, a fearless personality and "can win people over," said a Republican strategist, Vince Galko.

Before Thursday, Trump had been silent about Barnette, only attacking McCormick.

That changed swiftly after key endorsements for Barnette in recent days that perhaps reflect concerns in some conservative and pro-Trump circles that Oz doesn’t sufficiently reflect their views on abortion, guns or the culture wars against Democrats.

The anti-tax Club for Growth endorsed Barnette on Wednesday and has begun airing TV ads touting her.

A day earlier, the anti-abortion Susan B. Anthony List decided to back Barnette over Oz.

Despite his warning, Trump said Barnette would have his full support if she ends up winning the nomination.

Barnette, Trump said, "has many things in her past which have not been properly explained or vetted, but if she is able to do so, she will have a wonderful future in the Republican Party — and I will be behind her all the way."

Still, Barnette has a history of statements that are hostile about Muslims and gays, some of it unearthed from a Christian-themed blog and radio she once hosted before she ran for office, speeches she has delivered as a Christian activist or on social media.

She also has endorsed Doug Mastriano, a candidate for governor in Pennsylvania's big Republican primary field who is a prominent peddler of Trump’s unsubstantiated claims about widespread election fraud.