US President Donald Trump has endorsed a former top adviser to ex-British PM David Cameron for governor of California, shaking up an unusually unpredictable race in the heavily Democratic state.

In a Truth Social post, Trump declared Republican candidate Steve Hilton would be a great governor. The president argued that Democrats have done an absolutely horrendous job in California and that people are fleeing the state.

Hilton is one of 10 total candidates running in the 2 June primary. The top-two finishers, regardless of party, will advance to the general election.

Republicans have not won a statewide election in California in two decades.

Hilton posted on X on Monday that he was deeply honored to receive the Republican president's endorsement. However, Trump's backing could become a hindrance if Hilton faces a Democrat in November's election in the liberal-leaning state.

Hilton, who now lives in California, previously served as a top aide to Cameron from 2010–12, but later grew critical of the Conservative prime minister's immigration policy.

Hilton went on to host a Fox News show for several years and continues to contribute to the conservative news network. He is running for governor on a platform of lower taxes and cutting back the state budget, while helping lower housing and other costs for families.

Hilton joined Stanford University in California as a visiting scholar in 2012 and said he was applying for US citizenship in 2019.

Democrats dominate California state politics, but Republicans viewed this as a rare chance to capture the governor's mansion because of a splintered Democratic field of candidates in the state's so-called jungle primary system.

Trump's endorsement of Hilton, however, may squeeze out the other Republican in the race, Riverside County Sheriff Chad Bianco, leaving the door ajar for a Democrat to become a top vote-winner.

A March poll by the University of California, Berkeley's Institute of Governmental Studies rattled the political establishment, after it suggested Hilton and Bianco were ahead of the Democratic contenders.

Democrats became alarmed enough that top state party officials called for some candidates to drop out.

The University of California, Berkeley poll suggested that congressman Eric Swalwell, former congresswoman Katie Porter, and billionaire climate activist Tom Steyer had the most support among the eight Democrats running.