SACRAMENTO (AP) — Democrat Lt. Gov. Gavin Newsom and Republican John Cox took an early lead in the race to replace Jerry Brown as California governor, one of hundreds of contests across the state that could solidify Democratic dominance and reshape the fight for control of the U.S. Congress.

Newsom and Cox traded the lead with about 30 percent each in early returns, with Republican Travis Allen and Democrat Antonio Villaraigosa about 15 points behind them.

READ MORE: Glendale School Football Teams To Hold 'Virtual Practices' After Positive COVID Tests

Because of California’s “jungle primary,” the top two vote-getters — regardless of party — advance to a runoff in November.

By 10 p.m. Tuesday, Republican John Cox had won the second spot for the November election.

Cox’s second-place finish in Tuesday’s primary ensures Republicans won’t be shut out of the race. But the San Diego businessman faces long odds against Democrat Gavin Newsom in a state where Democrats are increasingly dominating.

Cox got a major boost from President Donald Trump’s endorsement, which helped solidify his support among Republicans and push him past Villaraigosa, John Chiang and Delaine Eastin.

Trump’s endorsement was a blow to Republican Assemblyman Travis Allen of Huntington Beach, who portrayed himself as the candidate most loyal to the president.

Democratic Gov. Jerry Brown is barred by term limit laws from seeking re-election.

Brown, whose four terms spread over more than four decades are the most in state history, has not endorsed a successor. But a fellow Democrat, Newsom, is the clear front-runner.

Because of California’s “jungle primary ,” the top two vote-getters — regardless of party — advance to a runoff in November.

Newsom has said he would prefer to face a Republican and it’s understandable because Democrats dominate in California. Republican registration has fallen for years and the party has not won a statewide contest in more than a decade, when Arnold Schwarzenegger was re-elected governor in 2006.

READ MORE: Help Needed To Find 1969 Pontiac Firebird Trans Am That Was Being Stored In Trailer In Los Angeles Tow Yard

The election is pivotal for Republicans looking to end their mounting struggles and gain a stronger foothold in the nation’s largest state. For Democrats, who risk getting shut out of key congressional races, it has massive implications for their push to retake control of the U.S. House.

Democrats need to gain 23 districts nationally to flip the majority in the House, and a key part of their strategy is expanding their 39-14 advantage in the home state of Democratic leader Nancy Pelosi.

Los Angeles County officials said the names of more than 118,000 voters were omitted from voter lists because of a printing error, but residents could still cast provisional ballots that will be counted once their registration is confirmed.

Some counties reported light traffic at polling stations Tuesday, but officials pointed out many voters were mailing in their ballots.

Evelyn Corado, a 50-year-old preschool teacher from Huntington Beach and naturalized U.S. citizen from El Salvador, chose Villaraigosa for governor.

“He was already mayor of Los Angeles and I saw him do a lot for the Hispanic community,” she said after casting her ballot.

Cox, a businessman from San Diego has run unsuccessfully for a number of offices in his native Illinois but gained footing among California Republicans as the campaign progressed. He and Allen both aligned with Trump — Allen repeatedly noted Cox voted for Libertarian Gary Johnson in the 2016 presidential election; Cox said he regrets the choice — but the president chose Cox for his endorsement.

Trump is a popular punching bag for Democrats and unpopular with independents but maintains strong support and loyalty from the GOP base.

“I don’t think there will be a blue wave at all,” registered Republican Keith Smith, 66, said outside a Solana Beach polling place where he voted for Cox.

MORE NEWS: Fairfax’s Iconic El Coyote Restaurant Marks 90th Anniversary

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)