Democratic congresswoman Loretta Sanchez chats with audience members during a break in a U.S. Senate debate at the University of the Pacific in Stockton, Calif., on April 25. (Carlos Avila Gonzalez/San Francisco Chronicle via AP)

Rep. Filemon Vela (D-Texas) blasted the California Democratic Party for backing Attorney General Kamala Harris over Rep. Loretta Sanchez in the primary for U.S. Senate.

Vela in a statement Wednesday said the party’s active support of Harris “is insulting to Latinos all across this country.”

“Congresswoman Sanchez has served her Party and her state in an exemplary fashion for over 20 years,” he also said in the statement. “Surely, grassroots California Democrats will recognize that such disgraceful treatment of Congresswoman Sanchez will only lead the party in a foolish direction.”

A total of 34 candidates will be on the June 7 primary ballot for the seat being vacated by retiring Sen. Barbara Boxer. Under the state’s election rules, the top two vote-getters, regardless of party, will advance to the general election.

Harris has consistently led in public polls, and last week the state’s top Democrat, Gov. Jerry Brown, endorsed her. Sanchez has run second, far ahead of Republican candidates, meaning that she and Harris are likely to face each other in November.

At the California Democratic Party’s February convention, Harris, who is serving her second term as attorney general, won the endorsement with 78 percent of the vote. Sanchez, a 20-year veteran House member from Orange County, received 19 percent. Both candidates lobbied party delegates, and a 60-percent threshold is required for an endorsement.

Vela’s criticism of the state party is similar to Vermont Sen. Bernie Sanders’s complaints that the Democratic National Committee is showing favoritism to front-runner Hillary Clinton in the presidential primaries.

Asked why he criticized the state party’s endorsement, Vela said Thursday via email that Democratic organizations should not endorse in primaries: “The establishment should be available to help ALL Democratic candidates equally.”

“How can the Party claim to be supportive of the Latino community and at the same time alienate a qualified candidate in a historic election?” he wrote. “I hope this statement encourages Democratic leadership across this country to recognize that the Latino community should not be taken for granted. California is the most populated state in the country, with the largest number of Latinos than any other state in the country. The California Democratic Party has no business taking a position against Loretta Sanchez, who in my view is clearly the most experienced candidate in this race.”

In his original statement, Vela, who is a member of the Hispanic Caucus, also noted that Sanchez, 56, had the chance to make history as one of the first Latinas to be elected to the Senate. Catherine Cortez Masto, a Democratic Latina running for Sen. Harry Reid’s (D) open Nevada seat, also has a shot to win in November.

“Not one single Democratic Latina has ever been in the United States Senate, and the California Democratic 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,’ ” Vela said.

Luis Vizcaino, a senior adviser to the Sanchez campaign, said in response to Vela’s statement: “We trust the voters of California, not the Party insiders, will chose the next U.S. Senator.”

Sanchez has the support of the Congressional Hispanic Caucus’s BOLD PAC, as well as the Latino Victory Fund. Political leaders says Trump’s presence on the general election ballot could drive up turnout among Hispanics across the country.

Harris, 51, who is African American and South Asian, would be only the second black woman elected to the Senate since Illinois Democrat Carol Moseley Braun left office in 1999 after one term.

She is being supported by several national groups, including Emily’s List and the Congressional Black Caucus’s political action committee. Her spokesman Nathan Click also notes that she has the support of several California Latino leaders.

“We’re proud of the support our campaign has received. Our campaign won 56% of Latino delegates in the California Democratic Party’s endorsement vote and has the backing of important leaders like Dolores Huerta, Speaker Anthony Rendon, Speaker-Emeritus John Perez, Long Beach Mayor Robert Garcia and many others,” Click wrote in an email.

A general election showdown between Harris and Sanchez could be contentious, pitting two important Democratic constituencies, African Americans and Hispanics, against each other. But it would also mean that the new California senator would be a Democratic woman.

Mi­chael Soller, spokes­man for the Cali­for­nia Demo­crat­ic Party, told the National Journal this week that the party is committed to sending Harris to Washington.

“Kamala Har­ris won the over­whelm­ing sup­port of Cali­for­nia Demo­crats, and do­ing something in sup­port of her in the gen­er­al elec­tion is on the table, re­gard­less of who her op­pon­ent is,” Soller said.

A new poll released Wednesday showed Harris leading the primary contest with 27 percent of likely voters to 19 percent for Sanchez. The highest polling Republican candidate, former GOP state chairman Tom Del Beccaro, is at 8 percent. Nearly a third of voters remain undecided, a trend that has shown up in polls over the past several months.

Latino voters overwhelmingly support Sanchez over Harris — 48 percent to 19 percent. Harris has the edge among white voters, 36 to 24 percent. In previous polls, Harris had the overwhelming support of black voters, who make up about 10 percent of California’s Democratic voters.

The poll also asked voters who they would choose if the general election race is between Harris and Sanchez. They chose Harris over Sanchez 34 percent to 26 percent, but 24 percent said they would not vote for either candidate, with 15 percent undecided.