President Donald Trump endorsed Republican governor candidate John Cox on Friday, giving a boost to the San Diego businessman’s attempts to consolidate GOP support in next month’s primary.

“California finally deserves a great Governor, one who understands borders, crime and lowering taxes,” Trump tweeted. “John Cox is the man – he’ll be the best Governor you’ve ever had.”

California finally deserves a great Governor, one who understands borders, crime and lowering taxes. John Cox is the man – he’ll be the best Governor you’ve ever had. I fully endorse John Cox for Governor and look forward to working with him to Make California Great Again! — Donald J. Trump (@realDonaldTrump) May 18, 2018

The move could help Republicans avoid splitting their vote in the top-two primary and having a Democrat-on-Democrat governor’s race in November, which some activists worry would doom their turnout in other races around California.

Cox didn’t vote for Trump in 2016, instead supporting Libertarian Gary Johnson. But he’s since said that was a mistake and spoken out strongly in favor of Trump’s presidency. Cox, who once made a long-shot bid for president himself, also met with White House political staff in April.

Cox said in a statement that he was “honored and deeply grateful to my President and I am looking forward to working with him to make California great again.”

“Like the President, I’m a businessman who knows how to get things done,” he added.

Even if it helps him consolidate Republican voters in June, the endorsement could come back to bite Cox if he makes it to the general election. Trump’s approval rating continues to linger in the low 30 percent range in the Golden State, and even lower among the no party preference voters Cox would need to attract to win.

The Trump seal of approval for Cox is a blow for the other major Republican in the race, State Assemblyman Travis Allen of Orange County, who’s strived to fashion himself into the most Trump-like candidate for governor with red-hot rhetoric on immigration. In a tweet Friday, Allen said Californians deserve a governor “who actually VOTED for President @realDonaldTrump.”

Neither candidate won the support of the state party at their convention this month, although Cox got the vote of 55 percent of the delegates. He also has the endorsement of more of the state’s Republican establishment, including House Majority Leader Kevin McCarthy, a close Trump ally.

The top two candidates in the primary, regardless of party, will move on to the general election, and Republicans are hoping to avoid getting locked out. Recent polls have shown Cox in second place behind Lt. Gov. Gavin Newsom, a Democrat — although several other candidates, including Allen and former Los Angeles Mayor Antonio Villaraigosa, aren’t far behind.

Several of Cox’s Republican supporters, including prominent San Diego activist Carl DeMaio, called for Allen to drop out following Trump’s endorsement. Other California GOP activists argued that Trump had chosen the wrong man. Latinos for Trump founder Marco Gutierrez tweeted that the “establishment has managed to misguide our @POTUS by seducing him to endorse” Cox.

Trump’s jump into the California primary comes in the midst of the ongoing war of words and lawsuits between Sacramento and D.C. Just this week, Trump met with anti-sanctuary officials from California at the White House to bash Gov. Jerry Brown and the state’s other Democratic leaders.