California attorney general Kamala Harris continues to hold a sizeable lead over Rep. Loretta Sanchez in the contest for the open Senate seat, according to a poll released early Wednesday.

But a second poll released Wednesday night suggested that Sanchez was gaining ground on Harris, who has consistently led in the race to replace Sen. Barbara Boxer.

With just over six weeks until Election Day, time is running out for Sanchez, a Democrat from Orange County, who has struggled to raise money and close the gap in public polling since entering the race 16 months ago.  Harris, who is from the San Francisco Bay area and also a Democrat, has been the frontrunner since announcing her bid to succeed Boxer (D-Calif.), who is retiring after nearly 24 years.

Harris was the choice of 42 percent of likely voters – 22 points more than Sanchez’s 20 percent support – in a new survey by The Field Poll and the Institute of Governmental Studies at the University of California-Berkeley. The poll was conducted by online polling firm YouGov and it showed that nearly 4 in 10 respondents said they were either undecided or do not plan to vote in the Senate race.

Hours later another poll showed Sanchez trailing by only 7 points among registered voters and her campaign argues that it is a more accurate measurement of the mood of the electorate because it was conducted by telephone using random sampling. The poll by the Public Policy Institute of California showed Harris had the support of 32 percent of likely voters and Harris with  25 percent. In July, that survey had Harris leading Sanchez by 18 points.

But the new Public Policy poll also found that more than 4 in 10 likely voters say they are undecided or would not vote for either candidate, a consistent trend in polling on the race over the past year. When those who say they do not intend to vote in the race are excluded, Harris’s overall lead grows to 10 points.

Two other polls released this month that showed Harris with a double-digit lead. A SurveyUSA/KABC/SCNG poll had Harris leading 44 to 27 percent and a USC Dornsife/Los Angeles Times poll put the attorney general ahead 30 to 16 percent.

But, like the other polls, those surveys showed large numbers of voters were undecided: 26 percent in the Field Poll; 29 percent in the Survey USA poll and 36 percent in the L.A. Times poll. In each survey, significant percentages of voters, mostly Republicans, said they would vote for neither candidate.

The poll numbers for both candidates have changed over the past several months.

“The static situation in this race is a function of very little campaign activity from the Sanchez campaign who needs it and the Harris campaign who doesn’t,” Mike Madrid, a Republican political consultant based in California said Tuesday. “It’s also very clear that with a strong paid media effort this race could tighten up quickly.”

California voters find themselves having to choose between two Democrats because the state’s primary system advances the top two-vote-getters, regardless of party affiliation, to the general election. Sanchez easily beat several Republicans to win the second place spot in the June primary, but came in 20 points behind Harris.

Sanchez, in an interview Wednesday afternoon with KCRW public radio, dismissed the Field Poll as “an opt-in, online poll, so it doesn’t reflect the voter base that I have. My voters aren’t showing up in that.”

She also noted that Harris’s numbers haven’t moved much either. “She’s still just around 40 percent. She’s not been able to break that, she’s not getting a majority of the people. A lot of people are undecided. People are just beginning to pay attention to this race.”

The new Field Poll survey drew its sample from an Internet panel of respondents, rather than a random sample of the population, so no margin of sampling error was reported. The survey conducted a random sample telephone poll in July that showed Harris up 15 points.

In the most recent Field Poll survey, Harris and Sanchez are tied among Latino voters — 35 percent for Harris to 34 percent for Sanchez — with 22 percent undecided.

In the Public Policy Institute poll, Sanchez holds an overwhelming lead among Latino voters — 58 percent to 16 percent, and she does better with voters who have only a high school education and earn less than $40,000 a year. The poll shows Harris dominating with Democratic voters and liberals.

Their candidacies have drawn national attention because the election of either woman to the Senate would make history: Harris would be only the second African-American woman in the Senate and Sanchez would be among the first Latinas. Catherine Cortez Masto is the Democratic nominee for the open Senate seat in Nevada.

A 24-year veteran of the House, Sanchez, 56, has the support of 17 members of the California Democratic delegation. Even a big name from the GOP’s delegation, Rep. Darrell Issa, told the L.A. Times that he was supporting Sanchez. She also has been endorsed by conservative radio talk show host Hugh Hewitt.

Sanchez has described herself as a moderate Democrat, who has worked well with her GOP colleagues on the House Armed Services and Homeland Security committees. In the most recent Field survey, Sanchez led Harris among Republicans 20 to 13 percent. But an even larger 30 percent of GOP voters said they would not vote for either Democrat, while 37 percent said they were undecided.

Harris, 51, has the strong backing of the Democratic Party – from President Obama and Vice President Biden to the California Democratic Party, whose endorsement she won with 78 percent of delegates to Sanchez’s 19 percent. She also has raised $12 million for the campaign to Sanchez’s $3.8 million. Harris is serving her second term as attorney general and is a former San Francisco district attorney.

“Kamala’s campaign is about bringing Californians in every community together to reject the politics of fear and division,” said Harris campaign spokesman Nathan Click. “Our campaign is going to continue working hard, and we aren’t taking anything for granted.”

The two candidates are scheduled to face each other in a debate on Oct. 5.

Polling director Scott Clement contributed to this report.