Pete Buttigieg, the mayor of South Bend, Indiana, and upstart Democratic presidential hopeful, on Thursday expressed regret over using the politically charged term "all lives matter" in 2015, explaining that he didn't understand it was coined to "devalue" the Black Lives Matter movement.

"What I did not understand at that time was that phrase ... was coming to be used as a sort of counter-slogan to Black Lives Matter," Buttigieg said after a speech at the Rev. Al Sharpton's National Action Network's annual convention in New York City.

"And so that statement, which seems very anodyne and something that nobody could be against, actually wound up being used to devalue what the Black Lives Matter movement was telling us," he added. "Since learning about how that phrase was being used to push back on that activism, I stopped using it in that context."

In March 2015, during a State of the City speech in South Bend, Buttigieg was discussing race and policing issues, calling on his city to "begin talking about racial reconciliation."

"There is no contradiction between respecting the risks that police officers take every day in order to protect this community, and recognizing the need to overcome the biases implicit in a justice system that treats people from different backgrounds differently, even when they are accused of the same offenses," he said, according to a transcript published by The South Bend Voice. "We need to take both those things seriously, for the simple and profound reason that all lives matter."

"All lives matter" sprouted up on Twitter and at political rallies as a hashtag and slogan used by critics of Black Lives Matter to counter the movement's cause of ending police brutality and systemic discrimination against African-Americans. President Donald Trump used the "all lives matter" phrase frequently during the 2016 presidential campaign. Hillary Clinton once used it as well, in 2015, earning fierce blowback from progressives.

Meanwhile, during his speech to the National Action Network convention on Thursday, Buttigieg stressed the importance of repeating "again and again that Black Lives Matter."

"We insist that being pro-minority and being pro-racial justice not only can but must be compatible with being pro-rule of law and respectful of law enforcement doing the right thing. It should enhance, not diminish, the value of a good police department, when we assert what should go without saying, but in these times must be said clearly and again and again — that black lives matter," Buttigieg said, prompting applause.

Several 2020 candidates are making appearances at the four-day convention this week, attempting too woo Sharpton and make inroads with the influence he carries among progressives and African-American voters.

In his 15-minute speech, Buttigieg called for the death penalty to be abolished in the U.S. and said, if elected, he would push for national legislation that would allow ex-felons to vote.