Democrats are spending unprecedented sums on three southern California House races just so their candidates can come out of Tuesday's "jungle primary" alive and compete in the general election.

National Democratic groups—including the National Democratic Congressional Committee, the House Majority PAC, and others—have spent an estimated $6 to $7 million on TV and direct mail on three key races, according to political operatives closely monitoring the media buys and expenditures.

National GOP groups, meanwhile, have focused most of their efforts on digital ad campaigns on Google, Facebook, and other social media sites, which are harder to track in terms of media buys but also far less expensive than TV.

The unusual scenario is playing out in Orange and northern San Diego counties, which have trended more liberal in recent years but still boast a significant GOP edge in voting registrations.

Earlier this year, Democratic activist groups succeeded in convincing two incumbent GOP House members, Reps. Darrell Issa and Ed Royce, to retire. Rep. Dana Rohrabacher (R., Calif.), whose vocal support for President Trump has become liability in the district, was also showing signs of vulnerability.

Minority Leader Nancy Pelosi (D., Calif.) has said Democrats' path to retaking the House majority runs through California and has targeted Issa's and Royce's seats as must-wins to achieve their oft-touted "blue wave."

However, Democrats are struggling to make sure they can survive California's jungle primary, which allows the top two primary vote-getters regardless of party to move on to compete in the general election in November.

With so many Democratic candidates running in each district, they could end up dividing the Democratic vote so that they are shut out of the general and two Republicans emerge in the general election.

The Democratic Congressional Campaign Committee (DCCC), the House Democrats' campaign arm, this week acknowledged the "serious risk of being shut out of California's two primary system looms over multiple races."

DCCC spokeswoman Meredith Kelly said her side was overcoming the challenge by "significant investments" in voter registration, get-out-the-vote efforts, and paid advertising.

"California Democrats have organized, marched and fought like hell to hold California Republicans accountable, and they deserve to have a Democrat on the ballot in November who will bring California values to Washington," she said in a statement.

Jesse Hunt, a spokesman for the National Republican Congressional Committee, said Democrats are being forced to waste money early on in the midterms because they tried to make firm GOP seats competitive.

"Democrats are emptying the bank in order to save damaged candidates from being locked out of must-win races this fall," he said. "Republicans have been always been in strong position to retain these seats, and the recent turmoil has only bolstered their standing."

There are tangible signs that the expected Democratic "blue wave" in California has shifted with the political tide.

A new poll by UC Berkeley's Institute of Governmental Studies (IGS) shows that GOP gubernatorial candidate John Cox, once believed to be a long shot to make it in the state's top-two primary, is now in a solid second place with 20 percent of likely voters supporting him.

Cox shoved aside former Los Angeles Mayor Antonio Villaraigosa, a Democrat, who pulled in 13 percent of voters, but still significantly trails Democratic frontrunner Gavin Newsom, who has the backing of 33 percent of likely voters.

Meanwhile, former State Sen. Kevin de Leon, the author of the controversial sanctuary state law who is challenging Sen. Dianne Feinstein (D., Calif.) from the left, is barely in second place according to the IGS poll. Republican James Bradley is unexpectedly close in third.

These figures spell trouble for down-ballot Democrats in the state as well.

In the battle to replace Royce in the 39th district, 13 candidates have spent a combined $10.6 million, with $9 million of that being spent by the Democratic candidates, according to the Center for Responsive Politics' opensecrets.org.

The DCCC endorsed philanthropist Gil Cisneros, whose campaign has spent $3.9 million with another $828,000 coming from the DCCC on his behalf. There are two other Democrats in the race—Andy Thorburn and Mai Khanh Tran—both of whom also have spent seven figures on the contest. Seven Republican primary candidates, meanwhile, have spent just $1.5 million total, with Young Kim leading the pack in spending $641,000 from his campaign, with outside GOP groups kicking in another $396,000 on this behalf.

Democrats' efforts to oust Rohrabacher in the 49th district also haven't been smooth sailing.

Rohrabacher faces nine challengers in the coastal Orange County district, including one strong GOP candidate. Local and national Democrats are deeply divided about the contest, with the California Democratic Party endorsing Hans Keirstead, and the DCCC backing Harley Rouda. Keirstead has spent $1.4 million on the race, while Rouda has doled out $1.3 million, according to opensecrets.org.

Meanwhile, Republican Scott Baugh has outspent Rohrabacher, doling out $1.54 million to the congressman's $1.49 million. Without public polling of the districts it is difficult to tell who is leading, but political observers say it is possible that Rohrabacher and Baugh could emerge from the primary as the top two voter winners.

In the race to succeed Issa, the top three Democratic candidates have far outspent the top three Republicans.

National Democrat of choice, environmental lawyer Mike Levin, has spent a total of $1.4 million on the race, while former Marine Col. Doug Applegate, who came within 1,600 votes of beating Issa in 2016, has spent $920,000, federal election records show.

Qualcomm heiress Sara Jacobs has spent the most in the race, $1.8 million, after giving her campaign a loan of $1.5 million.

Despite these expenditures, Republican State Assemblyman Rocky Chavez was leading the field in the latest San Diego Union-Tribune poll taken in mid-April. Chavez has spent just $200,000 on his campaign, while Diane Harkey, a former GOP state legislator who now serves on the state Board of Equalization, has spent $372,000, federal election records show.

Another GOP contender, San Diego County Supervisor Kristin Gaspar, has spent $290,000 on the primary contest.