U.S. Senate candidate Loretta Sanchez apologized Sunday after a videotape of her making a racially offensive gesture surfaced Saturday.  

Speaking to delegates at a state Democratic convention Sunday, the 10-term lawmaker said she said something offensive "and for that I sincerely apologize."

The video, which was shared on social media, shows Sanchez tapping her hand over her open mouth and making a whooping sound while speaking to a group of delegates Saturday.

Sanchez’s rival, Attorney General Kamala Harris, called the gesture “shocking.”

The video was shared on social media Saturday. It shows Sanchez tapping her hand over her open mouth and making a whooping sound while speaking to a group of Indian-American delegates at the convention.

Sanchez made the gesture while talking about her confusion over whether a potential campaign support, who had referred himself as from the “Indian American community,” was Native American or South Asian descent.

Sanchez told reporters afterward that American Indians have a “great presence in our country and many of them are supporting our election.”

Harris, whose mother was an immigrant from India,” said, “There is no place for that in our public disclosure.”

The incident came during a convention in which the 2016 Senate race played out among speeches and partying. The two Democrats are leading contenders for the vacated seat left by retiring Sen. Barbara Boxer.

Earlier, Harris defended her qualifications on foreign affairs and national defense after Sanchez had suggested she doesn't have the skills for the job in Washington.  

Harris told reporters that voters next year will determine who is qualified for the Senate seat, and her experience as a two-term attorney general and a former local prosecutor gave her the background she would need on Capitol Hill.  

"I feel certainly equipped to have a sense of what California needs and wants as it relates to many issues," Harris said. As a career prosecutor, "I know the stuff they do in Washington actually impacts California."

Sanchez entered the race Thursday and spent the day dashing to and from convention meetings, shaking dozens of hands and posing for snapshots. When she entered the race last week, Sanchez said that her long experience in defense and foreign affairs on Capitol Hill was essential in “perilous times,” drawing contrast with Harris.

Harris has targeted what she says is the dysfunction of Capitol Hill in her speeches. She never mentioned Sanchez, but the statements appeared to suggest that the congresswoman was part of the problem. Harris said that everywhere she travels as a candidate she is asked how she can “possibly get anything done” in paralyzed Beltway politics.

Speaking later with reporters, Harris pointed to her work along the U.S.-Mexico border on drug trafficking as state attorney general.  

The contest between the two high-profile Democrats has geographic, racial and political dimensions. Sanchez, 55, is Hispanic with a background in national defense issues and roots in Southern California. Over the years, she has belonged to a faction of moderate Democrats known as the Blue Dog Coalition. Harris, 50, a favorite of the party's left wing, is a career prosecutor from the San Francisco Bay Area whose father is black and mother is Indian.  

Sanchez, speaking to members of the party's Chicano Latino Caucus, said she wanted to appeal across the state's diverse population. "We will win, and we will win with a fabric of everybody," she said.

The Associated Press contributed to this report.