With California’s overall politics having turned more liberal in recent decades, much of the national spotlight before the election was on congressional seats in two historically conservative bastions that have become more Democratic: Orange County, the birthplace of Richard M. Nixon, and the Central Valley, the agricultural heart of California.

The Democratic Party targeted seven Republican-held districts across the state that Hillary Clinton won in the 2016 presidential race, hoping to flip them and help the party secure control of the House of Representatives.

In and around Orange County, four districts long held by Republicans had been seen as vulnerable, reflecting how political leanings have changed over the last decade in a region that once symbolized conservative politics. These seats include those held by Dana Rohrabacher, a conservative who has served in the House since 1989, and Mimi Walters. Democrats also mounted stiff challenges for the seats currently held by Darrell Issa and Ed Royce, Republicans who are retiring.

In another district, in northern Los Angeles County, the Republican incumbent, Steve Knight, had been locked in a competitive race against the Democratic challenger, Katie Hill, a 30-year-old who has been an advocate for the homeless.

In the Central Valley, Democrats had focused on trying to defeat the incumbent Republican, Jeff Denham, who faced Josh Harder, a venture capitalist. Mr. Denham barely eked out re-election in 2016, and significant concern about the Trump administration’s immigration policies — Hispanics make up 40 percent of the population in the farming region — made this year’s environment favorable for Mr. Harder.

But throughout the campaign season, the central question — here, as across the nation — had been whether young people and Latinos would turn out in large numbers to vote, which would heavily favor Democrats like Mr. Harder, who made his case at a town hall last month to an audience of Latino voters.

“The way we do it is by making sure people vote,” he said. “Many of the challenges we have date back to the fact that not everybody has their voices heard in the political process. We have to change that this year.”