Former President Trump threw his support behind Republican Doug Mastriano for Pennsylvania governor just three days before the primary election, citing Mastriano's efforts to go after the 2020 election "theft."

Mastriano, a state senator and retired U.S. Army colonel, already was leading the pack of GOP candidates, and Trump's endorsement is likely to cement his advantage over former GOP Rep. Lou Barletta, former federal prosecutor Bill McSwain and businessman Dave White in Tuesday's GOP primary.

KATHY BARNETTE SOARS IN PA ELECTION POLLS, GRABS MAJOR OUTSIDE SUPPORT IN GOP SENATE PRIMARY

Trump endorsed Barletta for the 2018 Senate race where he lost to Democratic Sen. Bob Casey.

Doug Mastriano Pennsylvania

Pennsylvania state Sen. Doug Mastriano, R-Franklin, a Republican running for governor of Pennsylvania, meets supporters at a campaign stop Tuesday, May 10, 2022, in Portersville, Pa.  (AP Photo/Keith Srakocic)

"There is no one in Pennsylvania who has done more, or fought harder, for election integrity than state Senator Doug Mastriano," Trump said in his endorsement statement Saturday. "He has revealed the deceit, corruption, and outright theft of the 2020 presidential election, and will do something about it."

Mastriano floated a plan to overturn Trump's 2020 loss to now President Biden, and was at the U.S. Capitol when it was stormed on Jan. 6, 2021, by right-wing extremists aiming to disrupt congressional certification of Biden's Electoral College victory. 

Lou Barletta Senate

Lou Barletta speaks at a news conference where he accepted the endorsement of a rival in Pennsylvania's crowded Republican primary for governor, Jake Corman, right, May 12, 2022, in Harrisburg, Pa. (AP Photo/Marc Levy)

Some GOP leaders in Pennsylvania have fretted that Mastriano is too far right to win in a general election, including his peddling of unsubstantiated claims that widespread fraud marred the 2020 election. Mastriano earlier this week said the Republican establishment "is in a panic mode" over the prospect of him winning the GOP nomination on Tuesday.

FOX NEWS POLL: THREE-WAY RACE IN PENNSYLVANIA GOP SENATE PRIMARY ELECTION

Trump also recently endorsed in the volatile Pennsylvania Senate race, backing former TV doctor Mehmet Oz over veteran and political commentator Kathy Barnette and over hedge fund CEO David McCormick, whose wife, Dina Powell, served in Trump’s administration. 

Pennsylvania Senate candidate Mehmet Oz, left, accompanied by former President Donald Trump speaks at a campaign rally in Greensburg, Pa., Friday, May 6, 2022. (AP Photo/Gene J. Puskar)

Pennsylvania Senate candidate Mehmet Oz, left, accompanied by former President Donald Trump speaks at a campaign rally in Greensburg, Pa., Friday, May 6, 2022. (AP Photo/Gene J. Puskar)

Barnette has been surging in the final days of campaigning and Oz's win is far from a sure thing. Trump is worried that Oz could lose, so his endorsement of Mastriano could be a way of hedging his bets on Tuesday, Axios reported

CLICK HERE TO GET THE FOX NEWS APP

Fox News polling released Tuesday found that Mastriano was well on his way to victory Tuesday. He broke away from the pack and now leads with 29% support. The next tier includes Barletta at 17%, McSwain at 13% and White at 11%.  

The GOP winner would face presumptive Democratic nominee, state Attorney General Josh Shapiro in November.

Fox News' Paul Steinhauser and Dana Blanton contributed to this report, as well as the Associated Press.