Updated

Republican businessman John Cox is shaking up the gubernatorial contest in liberal California, as he enjoys a strong position in the polls and the full-throated endorsement of President Trump ahead of next week's primary.

“California has a rare opportunity to turn things around and solve its high crime, high tax, problems -- along with so many others,” Trump tweeted on Memorial Day, 10 days after first endorsing Cox. “On June 5th, vote for GOP Gubernatorial Candidate JOHN COX, a really good and highly competent man. He’ll Make California Great Again!”

Democratic Lt. Gov. Gavin Newsom is still the clear front-runner in the race. But Cox could advance to the general election if he secures a second-place finish next Tuesday -- thanks to the state's unique "jungle primary" system that advances the top two finishers regardless of party.

Even a spot on the November ballot would mark a win for Republicans in the increasingly liberal state, where Democrats have controlled the legislature roughly 90 percent of the time and have held both U.S. Senate seats since 1992.

Trump Border

The race to replace Gov. Jerry Brown in California is seeing a surge from Republican candidate John Cox. (AP)

However, winning the governorship isn’t unthinkable, considering four of the last seven governors have been Republicans dating back to Ronald Reagan in 1967.

An Emerson College poll released Monday shows front-running Democrat Newsom leading with support from 24 percent of likely voters, followed by Cox at 16 percent and Democrat Antonio Villaraigosa at 12. It followed another poll also showing Cox in the second-place spot in the race to replace outgoing Democratic Gov. Jerry Brown.

Villaraigosa, the Los Angeles mayor, is now at risk of being shut out of the general election if Cox's support holds. He is considered more moderate than Newsom, a former San Francisco mayor, and remains widely popular among likely Hispanic voters.

But in a political twist, Newsom is launching ads against Cox -- which could have the effect of boosting the Republican's candidacy next week.

One Newsom video calls Cox a Trump “protégé” who spews “the same hateful rhetoric.” While his ads attack the GOP candidate, Newsom could be helping him with Republican voters by underscoring his ties to the president -- as he would presumably prefer to face the Republican, and not Villaraigosa, in November.

Cox’s closest Republican competition is state legislator Travis Allen, who finished fourth in the Emerson poll, at 11 percent.

The Huntington Beach-area lawmaker has also tried to align himself with the Trump agenda and this weekend appeared to bristle at Cox being endorsed by the president.

"Cox is a Never Trumper,” Allen tweeted Monday. “I think @realDonaldTrump was misled by the establishment in Washington, DC. I fully expect my phone to be ringing on June 6, and I expect Trump to say 'We made a mistake but now we're fully on board, LET'S GO TAKE BACK CALIFORNIA' "

The 62-year-old Cox, a successful Southern California businessman, is running on a pro-Trump agenda, with a top priority of ending the state’s “sanctuary” status and those of cities and counties that protect illegal immigrants from deportation.

“Politicians like Gavin Newsom thrive on the politics of division, supporting so-called sanctuary cities just to win votes,” Cox says in a campaign ad. “Let’s end sanctuary cities now.”

Cox aligns with Trump -- whose administration in March sued California over sanctuary laws -- in arguing that limiting local law enforcement officials from helping federal immigration agents has resulted in more crime.

Cox’s other top priorities include protecting Second Amendment rights and cutting taxpayer waste, including the state’s proposed high-speed rail, which he and other critics call a “boondoggle” and “the train to nowhere.” A recent analysis shows the cost now at $77 billion, up 20 percent from roughly two years ago. He also opposes a new gas tax hike.

“The top two issues are the state sanctuary state law … because it protects criminal illegal aliens … and the new gas tax,” Cox said last week on Fox News’ “Special Report with Bret Baier."

“It’s crushing workers in the state,” Cox also told Fox News.

Trump and other Republicans, at least until November, would surely be elated with Cox finishing second behind Newsom, because they desperately need a GOP candidate at the top of the state ballot this fall to bring out Republican voters. The situation is especially pressing in California congressional races, where Democrats are pouring hundreds of millions of dollars into bids to swipe seven GOP-held House seats. Higher GOP turnout could help Republicans hold at least some of them.

Cox, House Majority Leader Kevin McCarthy and other California Republicans also are trying to get a gas tax repeal initiative on the November ballot, in another attempt to get GOP voters to the polls.