(WHTM) – Pennsylvania State Senator Doug Mastriano is projected to win the Republican Pennsylvania governor’s race, according to the Associated Press.

With 50% of the vote in, the AP has Mastriano with 42.6% of the vote, followed by Lou Barletta at 23% and Bill McSwain at 15%.

Mastriano was endorsed by former President Donald Trump two days before the May 17 primary election.

Mastriano’s victory speech can be watched below:

Mastriano will now face Pennsylvania Attorney General Josh Shapiro, who won Tuesday after running unopposed in the Democratic primary.

Shapiro released a statement on Tuesday in reaction to Mastriano’s projected victory;

“Mastriano wants to dictate how Pennsylvanians live their lives – that’s not freedom. Real freedom comes when we trust Pennsylvanians to make their own decisions about who they love, who they pray to, and how and when they start a family here in our Commonwealth. I will work tirelessly every single day to win this election in November, defend Pennsylvanians’ freedoms, and meet this moment.”

Barletta’s election night speech following the projection can be watched below:

Bill McSwain released a statement saying he congratulated Mastriano on his victory.

“I have congratulated Doug Mastriano on his victory today and I wish him well in the General Election. It will take an all-out commitment to defeat Josh Shapiro, who would be nothing more than Tom Wolf 2.0. 

I am grateful to have been a part of this incredible process, and for the chance to share my vision for a safer, freer, more secure Pennsylvania with so many supporters and friends. 

While this result was not what we had hoped for, the people have spoken, and I will always respect the will of the great people of Pennsylvania. I entered the race because I love Pennsylvania, and I will always be committed to doing whatever it takes to create a better future for the communities that I love.” 

Mastriano, a vocal supporter of former President Trump, has led in recent polls despite establishment Republicans attempting to coalesce around candidates they believe can win in the general election.

Mastriano has vowed to eliminate “all pandemic executive orders and edicts” implemented by outgoing Governor Tom Wolf.

In February Mastriano was subpoenaed by the Jan. 6 committee for allegedly being “part of a plan to arrange for an “alternate” slate of electors from Pennsylvania for former President Trump and reportedly spoke with President Trump about post-election activities.”

The committee released its letter to Mastriano saying they “understand that (Mastriano was) present during the attack” and that he witnessed attacks on officers.

During Nexstar’s Republican Gubernatorial debate on April 28, Mastriano stated “there are no legal issues” regarding him and the Jan. 6 committee.

Mastriano has also been accused of belittling efforts to contain the COVID-19 virus and spreading conspiracy theories about the COVID-19 vaccine.

Mastriano’s surge came amid Republican Party leadership pushing the lower-tier of candidates to drop out and throw their support behind Barletta. Corman and Hart each did so earlier this week, but White and McSwain stayed in the race with the ballot already printed.

Some party leaders have reportedly feared Mastriano would not be able to win in a general election against Shapiro in November.

Amid the reported push to support Barletta, Mastriano told abc27 “in the end, it confirms so many people’s suspicions that there is a political establishment that tries to pick winners and losers. Sadly in the Republican establishment, they tend to pick losers.”