Republican gubernatorial candidate John Cox speaks during a debate at the California Theatre on May 8, 2018, in San Jose. Photo: Aric Crabb/San Jose Mercury News-Bay Area News Group via AP

In an unexpected intervention 18 days before Californians vote in their top two primary, Donald Trump tweeted an endorsement on Friday of one of the two Republicans in the gubernatorial race, businessman John Cox:

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

Cox is a wealthy self-funder who has for the most part been the strongest GOP candidate in polls leading into the June 5 primary, in which the top two finishers, regardless of party or percentage, will move on to the November general election. Right now Republicans are in danger of being shut out of that general election thanks to Cox and state legislator Travis Allen splitting the GOP vote, even as Lieutenant Governor Gavin Newsom steadily leads the field and fellow Democrat and former Los Angeles Mayor Antonio Villaraigosa surfs a wave of TV ads paid for by wealthy charter school supporters. Republicans hoped to solve the problem at their state convention earlier this month with an official endorsement, but Cox fell short of the 60 percent of delegates needed to make that happen. So now Trump’s giving him a push.

Cox’s wealth and poll standing made him a logical pick, though one might also discern the hand of the president’s good buddy Kevin McCarthy, the House majority leader from California, who is backing Cox. But it still has to be a bitter pill to swallow for Travis Allen, an avid MAGA-man and grassroots conservative favorite who incessantly reminded Republicans that Cox voted for Libertarian Gary Johnson rather than Trump in November 2016.

Cox has expressed regret for that vote, of course, and now claims to be on board the Trump train. So apparently all is forgiven.