Sen. Elizabeth Warren apologized to a largely Native American audience for “harm I have caused” after years of occasionally identifying herself as Native American, as well as for releasing a DNA test last year that she said supported her ancestry claims.

“I know that I have made mistakes. I am sorry for harm that I have caused. I have listened and I have learned,” Ms. Warren, a candidate for the Democratic presidential nomination, said Monday at the Frank LaMere Native American Presidential Forum in Sioux City, Iowa, where she received a standing ovation.

Ms. Warren, of Massachusetts, grew up in Oklahoma and long claimed Native American lineage as she pursued a career as a law professor. In February, she apologized to the Cherokee Nation leaders who criticized her release of the genetic test, which was a high-profile attempt by the senator to counter President Trump’s repeated mocking of her claim of Native American lineage.

The DNA analysis found that while the vast majority of her ancestry is European, Ms. Warren likely had a Native American ancestor six to 10 generations back. Critics including the president said that showed a tenuous link to Native American lineage.

“I can no longer call her Pocahontas, because she has no Indian blood,” Mr. Trump, who has mocked her with that name, said after the test. “She doesn’t qualify.”