SUNSET BEACH, Calif. (AP) — Endangered Republican incumbents advanced to November ballots in closely contested U.S. House races in California, where Democrats hope to capture a string of GOP-held seats in the party's bid to reclaim control of the chamber.

But the outcome in many crowded contests remained unclear Tuesday — it could take days to sort out — while Democrats feared being shut out of November runoffs in key districts.

Republican Rep. Mimi Walters easily advanced to the November election in her Orange County, California, district targeted by Democrats. She'll face Democrat Katie Porter, a law professor and consumer protection attorney who emerged from a bruising battle to capture the second slot.

In the neighboring 48th District, vulnerable Republican Rep. Dana Rohrabacher also advanced, claiming about 30 percent of the vote in a large field, according to partial returns.

Rohrabacher was facing challengers from both parties, including former Orange County Republican Party leader Scott Baugh. It's possible voters in the district could see only the two Republicans on the ballot in the fall, which would be a stinging setback for Democrats coveting the seat.

Democrats need to gain 23 districts nationally to take the gavel in the House, and a key part of that strategy is expanding their 39-14 advantage in the home state of Democratic leader Nancy Pelosi. The key battlegrounds are seven districts, mostly in Southern California, where Hillary Clinton defeated then-candidate Donald Trump in the 2016 presidential race, making them targets this year.

Republicans, including Rohrabacher and Walters in Orange County and Rep. Jeff Denham in Modesto, are among GOP incumbents on the defensive in a year when Trump could energize Democratic voters who loathe him, though Republican voters may show up eager to keep their party in charge in Washington. Denham easily advanced to November.

The uncertainty is heightened by the state's top-two primary system, in which all candidates appear on a single ballot but only the top two vote-getters regardless of party advance to a November runoff. In crowded, closely matched races, it's possible that only two Republicans advance to the runoff in some districts, or two Democrats.

A breakdown of mail-in ballots in key Orange County congressional districts compiled by nonpartisan Political Data Inc. showed the vote dominated by older, white voters, a vital demographic for the GOP.

Republicans are hoping a proposed gas-tax repeal and anger over illegal immigration will galvanize their voters.

THE WILD WEST

The retirements of long-serving Republican Reps. Ed Royce and Darrell Issa brought on a stampede of candidates, and the outcome remained clouded in those districts.

Seventeen names were on the ballot in Royce's district, the 39th, which includes parts of Orange, Los Angeles and San Bernardino counties.

Republican Young Kim, a former Royce aide who won his endorsement, claimed the top spot. Democrat Gil Cisneros, a Navy veteran and $266 million lottery winner, took the second slot.

Registration is closely divided, and Clinton carried the district by 9 points, making it an obvious pickup opportunity for Democrats. But the party's ambitions have been complicated by infighting among candidates.

There are 16 names on the ballot in Issa's neighboring 49th District, which includes parts of San Diego and Orange counties. Democrats nearly seized the seat in 2016, when Issa survived by a mere 1,600 votes. The coastal district has been growing more diverse and Democratic, although Republicans retain an edge in voter registration. Independents — who here tend to cast ballots like Democrats — make up one-quarter of the voters.

In the fight for November slots, Republican Diane Harkey landed the top spot, chased by a trio of Democrats, Mike Levin, Sara Jacobs and Doug Applegate.

PROTECT THE HOMELAND

Orange County has long been synonymous with Republican prestige and power, but that's changing. Hillary Clinton carried the county in the 2016 presidential race, along with four Republican-held House districts that are completely or partly within it. Rohrabacher, seeking his 16th term in the 48th District, and Walters, seeking her third in the 45th, contended with multiple Democratic challengers in districts that favor the GOP. In Rohrabacher's case, he's also competing with a strong challenge from a former protege, Baugh, who led the county's Republican Party for a decade. Two Democrats were in the chase in Rohrabacher's district for the second spot on the ballot in November, Hans Keirstead and Harley Rouda.

STAYING POWER

Republican Reps. Jeff Denham and David Valadao have been Democratic targets before, and survived. Denham, whose farm-belt 10th District includes Modesto, managed to hang on by a few percentage points in 2016, in a year when Clinton carried the district by 3 points.

Valadao has prospered in his San Joaquin Valley district, the 21st, despite a strong Democratic registration edge. Clinton carried the district by a wide margin in 2016, but so did he. Unlike other crowded races in the state, he's facing a single rival in November, Democrat TJ Cox.

DEALING WITH TRUMP: BEARHUG OR STIFF-ARM?

The president's poor approval ratings in California pose potential problems for some Republicans, but he could prove an asset for others in pockets where conservatives hold sway.

The 25th District that runs through northern Los Angeles County and a thin strip of Ventura County has a Democratic registration edge but a Republican congressman, Rep. Steve Knight. Not surprisingly in a swing district, he's occasionally created distance with the Republican president. Last year, for example, he criticized the president's proposed cuts to education. Clinton carried the district by 7 points in 2016, but Knight, a former state legislator, was re-elected with a 6-point margin. Several Democrats on the ballot will be dividing the party's vote, including lawyer Bryan Caforio, Knight's 2016 rival.

Knight advanced, but his Democratic rival remained unclear.

In the 22nd District, House Intelligence Committee Chairman Devin Nunes has gained national attention as an ardent Trump supporter eager to discredit special counsel Robert Mueller's Russia investigation. He carried the district, where Republicans hold a comfortable registration edge, by an impressive 35 points in 2016, when Trump also prevailed. He'll face Democrat Andrew Janz in November.