Ms. Sanchez surprised many in the political world when she was elected to the House of Representatives 20 years ago, beating a Republican incumbent in Orange County, which for decades had been a Republican stronghold. Now, as then, Ms. Sanchez is counting on deep support from Latinos.  Latino voter registration in California has nearly doubled this year, according to the secretary of state’s office, as voters also prepare to choose presidential nominees. Many believe those newly registered voters will turn out on Tuesday, driven in large part by anti-immigrant rhetoric from the Republicans’ presumptive nominee, Donald J. Trump. In a poll released in late May, Ms. Sanchez had the support of roughly 48 percent of Latinos, compared with 19 percent for Ms. Harris.  “What’s the one thing that can motivate more Latino voters than ever before? Donald Trump,” said Dan Schnur, the director of the Jesse M. Unruh Institute of Politics at the University of Southern California. “The question will be how strong those loyalties are.”  Far from ceding any ethnic voting bloc, Ms. Harris has spent much of her energy courting Latinos. She secured endorsements from Hilda Solis, a Los Angeles County supervisor who was President Obama’s first labor secretary, and Dolores Huerta, a farmworkers advocate who appears in a Spanish-language commercial for Ms. Harris.  Speaking recently to a crowd of union officials in Commerce, a city east of Los Angeles, Ms. Harris emphasized her own family’s immigrant roots and her support for overhauling immigration law.  “Latino voters are my voters,” she said. “They care about people’s commitment to their issues, and I’d match my record against anyone when it comes to looking at my longstanding commitment to all communities, including the Latino community. I reject the notion that this race is going to come down to ethnicity. It’s going to come down to what you’ve actually done and what you’ve demonstrated you can get done.”  For much of the race, Ms. Harris has largely ignored the rest of the field. She relies on the phrase “smart on crime” to convey her views on criminal justice and uses the label “fearless” in campaign advertisements. While her experience as the state’s top law enforcement official is her most important credential, she has never taken a position on a 2014 voter-approved measure to release thousands of inmates and reduce sentences for nonviolent offenders.  Ms. Sanchez, who is running her first statewide campaign, points to her work in Congress to portray herself as the candidate most prepared to deal with national security. She has promoted her support from colleagues in the House, campaigning with several of them in recent appearances. Representative Filemon Vela, Democrat of Texas, released a statement late last month calling the California Democratic Party’s support for Ms. Harris “insulting to Latinos all across this country.”  “Not one single Democratic Latina has ever been in the United States Senate,” Mr. Vela said in the statement, adding that the party’s position is "a disrespectful example of wayward institutional leadership, which on the one hand ‘wants our vote’ but on the other hand wants to ‘spit us out.’ ”  Though both women have aired commercials in the expensive media markets of the Bay Area and Los Angeles, Ms. Harris has raised more than three times as much money as Ms. Sanchez — $11 million compared with about $3.5 million as of Friday, according to the Center for Responsive Politics.  In the two televised debates, the three leading Republicans in the race focused much of their attacks on Ms. Harris. For them, the path to November relies on uniting Republican voters and a significant chunk of independents, who make up about a third of the state’s registered voters.  “We have two people at the top of the national ticket who are really divisive,” said Duf Sundheim, a Republican candidate and a former chairman of the state party, who has not said whether he will back Mr. Trump in the fall. “I think it’s really important to have someone in the Senate who can really do things in the middle.”  Tom Del Beccaro, another Republican candidate and former chairman of the state party, has called for a flat federal income tax and said Congress should focus on setting stricter immigration laws. Just as often as he talks about his positions on issues, Mr. Del Beccaro discusses the mechanics of Tuesday’s primary ballot.  With 34 names spread across two columns, he said, the ballot is too complicated, making it more likely that voters will not check boxes correctly.  “The top-two primary drives down participation and creates a lot of guess work,” Mr. Del Beccaro said.  Though he has raised hardly any money and has spent little time on the campaign trail, perhaps no other candidate has more directly pursued supporters of Mr. Trump and Senator Bernie Sanders than Ron Unz, a software engineer and political writer who has endorsed both an increase in the federal minimum wage and more limits on legal immigration. Mr. Unz rose to prominence here more than a decade ago when he backed a ballot initiative opposing bilingual education.  “The Republican Party in this state has almost been annihilated,” Mr. Unz said. “It’s going to be embarrassing for Republicans if they don’t even have a candidate in the fall, but this shows some enormous dissatisfaction with our respective parties that we will have to deal with in the future.”  A version of this article appears in print on June 5, 2016, on page A11 of the New York edition with the headline: California Senate Race Is a Tale of Diversity and a Flailing G.O.P. Order Reprints| Today's Paper|Subscribe
As the state’s open primary on Tuesday approaches, two Democratic women, one black and one Latina, are the leading contenders to advance to the November election.