TAMPA, FL - OCTOBER 24:  Voting booths are ready for voters at an early voting site in the Supervisor of Elections office on October 24, 2016 in Bradenton, Florida. Today early general election voting started in the state of Florida and ends on either Nov 5 or Nov 6th.  (Photo by Joe Raedle/Getty Images)
TAMPA, FL - OCTOBER 24: Voting booths are ready for voters at an early voting site in the Supervisor of Elections office on October 24, 2016 in Bradenton, Florida. Today early general election voting started in the state of Florida and ends on either Nov 5 or Nov 6th. (Photo by Joe Raedle/Getty Images)
PHOTO: Joe Raedle/Getty Images
Now playing
01:24
California's primary could be trouble for Dems
senator bill nelson 11132018
senator bill nelson 11132018
PHOTO: CNN
Now playing
02:03
Nelson: Scott should recuse himself
Rep. Marsha Blackburn, R-Tenn., speaks to supporters after she was declared the winner over former Gov. Phil Bredesen in their race for the U.S. Senate Tuesday, Nov. 6, 2018, in Franklin, Tenn. (AP Photo/Mark Humphrey)
Rep. Marsha Blackburn, R-Tenn., speaks to supporters after she was declared the winner over former Gov. Phil Bredesen in their race for the U.S. Senate Tuesday, Nov. 6, 2018, in Franklin, Tenn. (AP Photo/Mark Humphrey)
PHOTO: Mark Humphrey/AP
Now playing
01:26
Meet the Republicans who held onto the Senate (2018)
Democratic congressional candidate Ilhan Omar is greeted by her husband
Democratic congressional candidate Ilhan Omar is greeted by her husband's mother after appearing at her midterm election night party in Minneapolis, Minnesota, U.S. November 6, 2018. REUTERS/Eric Miller
PHOTO: Eric Miller/Reuters
Now playing
01:33
Minorities, LGBT make history in 2018 midterms
PHOTO: WJLA
Now playing
02:01
Hear from the Democrats who took back the House
PHOTO: CNN
Now playing
01:50
Abrams vows to remain in gubernatorial race
PHOTO: Spectrum News NY1
Now playing
02:05
Ocasio-Cortez: This is a movement for justice
PHOTO: KXAN
Now playing
02:07
O'Rourke congratulates Cruz on his victory
PHOTO: CNN
Now playing
01:57
Tapper: This is not a blue wave
PHOTO: CNN
Now playing
02:11
Van Jones: It's a rainbow wave
LAS VEGAS, NV - OCTOBER 20:  U.S. Rep. and U.S. Senate candidate Jacky Rosen (D-NV) speaks during a rally at the Culinary Workers Union Hall Local 226 featuring former U.S. Vice President Joe Biden on October 20, 2018 in Las Vegas, Nevada. Early voting for the midterm elections in Nevada begins today. (Photo by Ethan Miller/Getty Images)
LAS VEGAS, NV - OCTOBER 20: U.S. Rep. and U.S. Senate candidate Jacky Rosen (D-NV) speaks during a rally at the Culinary Workers Union Hall Local 226 featuring former U.S. Vice President Joe Biden on October 20, 2018 in Las Vegas, Nevada. Early voting for the midterm elections in Nevada begins today. (Photo by Ethan Miller/Getty Images)
PHOTO: Ethan Miller/Getty Images
Now playing
01:45
CNN projects Jacky Rosen elected to US Senate
Additional Embargo:   Additional Source(s):    Date Shot: 11/6/2018   Shipping/Billing Info:     Description: Projects: None  Cost Center: Atlanta National Desk / 20100101   Created By: DHackett  On: 1541544461  --------------------------------------------------------------------------------
Additional Embargo: Additional Source(s): Date Shot: 11/6/2018 Shipping/Billing Info: Description: Projects: None Cost Center: Atlanta National Desk / 20100101 Created By: DHackett On: 1541544461 --------------------------------------------------------------------------------
PHOTO: WSB;
Now playing
00:59
Brian Kemp: Confident victory is near
2018 Elections Primary Clean path
2018 Elections Primary Clean path
PHOTO: CNN
Now playing
01:49
Pelosi: Tomorrow will be a new day in America
PHOTO: CNN
Now playing
01:36
The Democrats who might lead the House
PHOTO: CNN
Now playing
01:54
DeSantis thanks Trump in victory speech
PHOTO: KXAN
Now playing
01:44
Cruz: This election was a battle of ideas
(CNN) —  

Democrats breathed a sigh of relief on Wednesday, as they appeared poised to avoid the nightmare scenario they feared in California — where they could have been locked out of competing in several key congressional races in November.

There are still tens of thousands of ballots to be counted in three of the most closely watched races in the country: California-39, California-48 and California-49. Because of the slender margins and the complications of California’s “top two primary” – where the two highest vote-getters advance to November, regardless of party – the number two candidate was still unclear in two of those races.

Several of the Democratic candidates refused to concede in those districts, which are held by Republicans but were won by Hillary Clinton in 2016 and are key to Democratic hopes of notching the 23 seats that they need to win back the House.

There is still a possibility that Democrats could be boxed out of competing in California-48, the coastal Orange County district represented by Congressman Dana Rohrabacher.

Rohrabacher easily secured a spot to compete in November. But Democrats Harley Rouda, a real estate businessman, and Hans Keirstead, a neuroscientist, were separated by 73 votes, at 17.3% and 17.2% respectively. Republican Scott Baugh, the former Orange County GOP chair, was about 1,100 votes behind Keirstead.

The Orange County registrar reported Wednesday morning that there were still 188,488 ballots to count – a trove of ballots that could affect all three Congressional races.

Rouda initially claimed victory in a statement, but the count is continuing. On Twitter, Keirstead said that “an overwhelming majority of #CA48 voters came together yesterday to #FireDana. Flipping the 48th is finally within our reach—let’s make sure every lawful vote is counted & get to work to defeat @DanaRohrabacher.”

CNN has projected that one Democrat will advance in California’s 49th District, where Rep. Darrell Issa is retiring, avoiding a shutout for the party. Republican Diane Harkey, who was endorsed by Issa, cleared the top spot.

Mike Levin, an attorney who is the former executive director of the Orange County Democratic Party, is leading in early returns. His closest contender, former state department contractor Sara Jacobs, maintained that she is still in contention for second place as the count continues.

In a statement Wednesday, Jacobs noted that election officials in Orange and San Diego counties have said there are still tens of thousands of ballots to be counted.

“I feel, and I’m sure everyone agrees, that it’s important that every vote be counted and we’re going to allow that process to continue,” Jacobs said.

In California’s 39th Congressional District, which includes parts of Orange, Los Angeles and San Bernardino counties, CNN projects that former California State Assemblywoman Young Kim and Democrat Gil Cisneros, who was endorsed by the Democratic Congressional Campaign Committee, will advance to the November contest.

In California’s 25th district, represented by Steve Knight, CNN projects that Democrat Katie Hill will face the incumbent.

There may be a higher number of provisional ballots to count in CA-39 and CA-25, because of a printing error in Los Angeles County that left 118,000 voters off the roster on Election Day.

Republicans, however, had a good night in California, because their leading candidate for Governor, John Cox, made it on the November ballot where he will face off against Lt. Gov. Gavin Newsom, who easily finished first.

If they had been shut out of the governor’s race in November, Republicans worried that would depress GOP turnout statewide – making it much easier for Democrats to pick off their most vulnerable incumbents.

The Republican share of the electorate has been shrinking for decades in California, and the GOP does not hold any statewide offices. So until President Donald Trump began tweeting in support of Cox, Republicans had feared that Newsom might end up in the November contest with Democrat Antonio Villaraigosa, but the former Los Angeles mayor fell far short and conceded defeat.

Veteran California Sen. Dianne Feinstein cruised to the November ballot with strong support from Democrats. CNN projects that her upstart challenger, state Sen. Kevin de León, will face her on the November ballot, after he narrowly avoided defeat by a virtually unknown Republican for the second spot.

De León has argued that he represents a more progressive wing of the Democratic Party than Feinstein, but he has gained little traction in his quest to unseat her – even though his support from California delegates deprived her of the Democratic Party endorsement earlier this year.

Feinstein remains enormously popular among Democrats, in part because of her untiring battle for additional gun control measures including an assault weapons ban. Because of her dogged leadership on the Senate Intelligence and Judiciary committees, she has also won the respect of moderates and independents over the years, which has widened her margins of support.

De León is little known beyond his Los Angeles district, and has never run statewide. He struggled to raise money even from allies who had supported him at the Statehouse, in part because of the reverence for Feinstein and because many Democrats did not want to lose her seniority in the Senate.

“This nation was built on the promise that anyone willing to risk it all to come here – regardless of who they are or where they came from – could have a fair shot at a hard day’s work, afford a roof over their head, affordable health care, and an equal opportunity to succeed. It’s time Californians had a United States senator committed to making good on that promise,” de León said.

“Voters deserve a spirited debate in the coming months on the issues they care about most and the challenges facing our state. I look forward to engaging my opponent on the debate stage as we face off in November.”

Alabama, Iowa, Mississippi, Montana, New Jersey, New Mexico and South Dakota also had primary races Tuesday.

In Montana, State Auditor Matt Rosendale will win the GOP Senate primary, CNN projects, and will face incumbent Democratic Sen. Jon Tester, who is running for a third term in a state Trump won in 2016.

In Alabama, Republican Rep. Martha Roby will face a July runoff to save her seat after failing to top 50% in Tuesday’s primary. Roby will face Bobby Bright – a former Democratic congressman who is now running as a Republican. Roby fell short of 50% in part because she is paying a price in deep-red Alabama for saying in 2016 that she would not vote for Trump.

In South Dakota, Rep. Kristi Noem won the Republican primary for governor against Attorney General Marty Jackley. If Noem wins in November, she’d be the state’s first female governor.

In Iowa, Democrat Fred Hubbell won his primary to face Republican Gov. Kim Reynolds. Two women in Iowa advanced to the general election on Tuesday. In Iowa’s 3rd Congressional District, small-business owner Cindy Axne and in Iowa’s 1st District, State Representative Abby Finkenauer, won their Democratic primaries to face incumbent Republicans in the fall.