Republican John Cox gets spot in runoff for California governor vs. Gavin Newsom

John Cox, a Republican business owner who has tried and failed for nearly two decades to win elected office, snagged a spot in the November runoff for California governor with the help of President Donald Trump, but that support could hurt him in the winner-take-all race with Democrat Gavin Newsom.

Cox got about a quarter of the votes counted so far in Tuesday's election to easily outdistance former Los Angeles Mayor Antonio Villaraigosa for second to Newsom, who won by a comfortable margin. Cox had been struggling to break clear of fellow Republican Travis Allen until Trump tweeted his endorsement two weeks ago - 273 characters that rallied the president's fans but set up a hyper-partisan battle with Newsom.

Because of California's "jungle primary," the top two finishers - regardless of party - advance to a runoff in November.

Newsom, the state's lieutenant governor and former mayor of San Francisco, had said during the primary he preferred a Republican opponent in the fall. He told supporters Tuesday that he relishes a fight with Cox, whom he called "a foot soldier" for Trump's war on California.

Meantime, Cox made it clear he'll be fighting Newsom on taxes and California's high cost of living.

"It wasn't Donald Trump who made California the highest tax state in the country," Cox told enthusiastic supporters. "It was Gavin Newsom and the Democrats."

Cox, 62, became wealthy as a lawyer, accountant, wealth manager and investor in the Chicago area. He now owns thousands of apartment units in the Midwest.

In the early 2000s he ran unsuccessfully for a string of offices in Illinois - U.S. House, twice for the U.S. Senate, and Cook County Recorder of Deeds, a job he wanted to see eliminated. He also ran for Illinois GOP chairman.

In his 2004 Senate run, he shared a crowded debate stage with then-state Sen. Barack Obama and sparred one-on-one with the future president over the Iraq war. He later ran for president in 2008 and fought unsuccessfully to get into Republican debates before dropping out, but his name appeared on the ballot in several states.

He bought his house in Rancho Santa Fe, outside San Diego, in 2007 and moved there full-time in 2011, according to spokesman Matt Shupe.

Cox, who has largely self-funded his campaign for governor, decries what he calls the corrupting influence of special interests - a line of attack he's sure to deploy against Newsom, who is backed by heavy-hitting unions, businesses and interest groups.

He's also focused heavily on California's high taxes and cost of living. He's one of the most prominent backers of a ballot initiative that would repeal recent increases in gasoline and diesel taxes, which is likely to qualify for the November ballot.

Tuesday's primary included a preview of the potency of the gas tax as a political motivator. State Sen. Josh Newman, a Democrat targeted for supporting the gas tax hike, was recalled by a wide margin.

The race for governor was one of hundreds of contests Californians narrowed on Tuesday. U.S. Sen. Dianne Feinstein cruised to first place in her bid for a fifth full term, while fellow Democrat Kevin de Leon finished second.

Northern California voters recalled the judge who gave a light sentence to a former Stanford University swimmer convicted of sexual assault. It could take days to sort out who will advance in several key Southern California races for U.S. House.

In the race for governor, Cox's second-place finish was a victory for a state GOP that has been shrinking in numbers and influence. It avoided a worst-case scenario where Republicans would stay home for lack of a candidate in the races for governor and U.S. Senate, thereby imperiling vulnerable Republicans in other races.

Cox faces long odds in November. No Republican has won statewide here since 2006. And while Trump is well-liked by the GOP base that boosted Cox, he's unpopular with independents and a call to arms for Democrats.

"Cox had to run toward Donald Trump to get Republican voters to rally around him in the primary," said Thad Kousser, chair of the political science department at University of California, San Diego. "The problem is, now he can't run away from Donald Trump in November."

Newsom's begins the race with inherent advantages - he's much better-known than Cox and a Democrat in a heavily Democratic state. He's motivated the liberal base with his support for a plan to provide universal government-funded health care and his support for aggressive gun controls.

"We're engaged in an epic battle, and it looks like voters will have a real choice this November - between a governor who is going to stand up against Donald Trump and a foot solider in his war on California," Newsom told supporters.

Villaraigosa's distant third-place finish was a stunning result for man once hailed a rising star in the Democratic Party and the face of the changing demographics in California and the nation. He was hoping to be California's first Latino governor since 1875.

His focus on energizing Latinos, moderate Democrats, independents and some Republicans wasn't enough to overcome Newsom's strength with the Democratic Party's liberal base or Cox's united GOP front.

He conceded Tuesday night and endorsed Newsom while also congratulating Cox.