SACRAMENTO, Calif./PRINCETON, N.J. (Reuters) - California Democrats overcame quirks in the state’s electoral system and managed to mount challenges to Republicans in most key Congressional races, as voters in eight U.S. states chose candidates for November’s midterm elections.

The state’s unusual system for choosing candidates, in which the top two vote-getters advance to the election regardless of party, had raised the prospect of Democrats being locked out of competitive polls in conservative suburbs south of Los Angeles.

In some areas, the large number of Democratic candidates risked splintering the party’s vote – though the same quirk also threatened to eliminate Republican John Cox from the race for Governor.

In the end, Democratic candidates made it through to the final vote, as did Cox.

“One party rule in Sacramento is bad enough,” said Cox, referring to the Democrats’ dominance of the legislature and all statewide officers. “But one-party elections is just plain un-American.”

Democrats, buoyed by President Donald Trump’s poor approval ratings and a string of victories in special elections, hope to gain a majority in the 435-seat U.S. House of Representatives by flipping 23 seats this fall. The party has targeted more than a dozen Republican-held seats in California and New Jersey alone.

Control of the House would likely stall much of Republican President Donald Trump’s policy agenda, while ushering a new era of committee oversight and investigation into the administration.

A power shift would also lend strength to any potential effort to impeach Trump if Democrats decide grounds exist, either by virtue of the ongoing probe into Russian election interference by special counsel Robert Mueller or other reasons.

California is seen as key to the eventual outcome in November. Democrats have taken aim at 10 of the 14 House seats held by Republicans.

Slideshow ( 12 images )

But strong turnouts by Republicans voters in all of the districts underscore the challenges that Democrats will face in trying to win in the conservative areas that they have targeted in suburban areas near Los Angeles and Sacramento, and in the agricultural San Joaquin Valley.

The battle for a place on the final ballot was particularly dramatic in the 48th Congressional District, where voters chose Democrat Hillary Clinton over Trump in the 2016 presidential election but re-elected longtime Republican Representative Dana Rohrabacher.

So many Democrats were vying to challenge Rohrabacher that they divided their party’s vote. With 414 of 415 precincts reporting early Wednesday, Rohrabacher easily won a spot on the November ballot. Two Democrats, Harley Rouda and Hans Keirstead, were next, separated by fewer than 100 votes, leaving the race too close to call.

About 1,000 votes behind the two Democrats was Republican Scott Baugh. If the final tally puts him ahead of them, it could set up a general election fight between Rohrabacher and his fellow Republican, ending Democrats’ chances to take that seat.

In the race for Governor, Democrat Gavin Newsom’s first-place finish over a field of 27 candidates was expected. But it is Cox’s presence as the second candidate to advance to the November ballot that could color the race. Republicans hope he will spur supporters to come out and vote in greater numbers, possibly improving the party’s chances in Congressional races.

In New Jersey, establishment-backed Democrats muscled past liberal challengers in key New Jersey congressional races on Tuesday, setting up contests in November that will test the question of whether more moderate candidates will fare better against Republicans in swing districts.

In southern New Jersey, where the retirement of a longtime Republican incumbent gave Democrats an opening, state Sen. Jeff Van Drew, a conservative Democrat, appeared set to prevail over left-leaning candidates frustrated by his past votes against same-sex marriage and minimum wage increases.

He will face Republican Seth Grossman, a former city and county official, who emerged from a four-way contest.

Slideshow ( 12 images )

In a suburban New Jersey district, former Obama official Tom Malinowski was well ahead of two Democrats backed by independent liberal groups and will take on the moderate Republican Leonard Lance in what is expected to be a competitive race.

Democrats also hope to capture two other Republican-held seats in the state.

Republicans control both chambers of Congress. While Democrats need only a net total of two seats to take command of the Senate, Democratic senators must defend a bevy of seats in rural states such as Indiana, Montana, North Dakota and West Virginia that supported Trump two years ago.

Voters on Tuesday also went to the polls to choose candidates in primaries in Iowa, Mississippi, Alabama, Montana, South Dakota and New Mexico.

A number of women won Democratic contests, continuing a trend that began earlier this year. Women will represent the party in key House races in Iowa, New Jersey and New Mexico, based on Tuesday’s results.