Pete Buttigieg's welcome applause at a televised town hall focused on gay and transgender issues was punctured by protests.

“Trans people are dying!” the group of transgender activists shouted at the CNN event on Thursday shortly after the South Bend, Indiana, mayor and midtier 2020 Democratic presidential candidate took the stage.

The demonstrators, bearing flags, were joined by some members of the studio audience chanting, “Trans lives matter."

Host Anderson Cooper, who is openly gay, acknowledged the disruption, saying their collective community has a "long and proud" history of activism and that their issues were ignored by the mainstream media.

"We applaud them for their protests," he said.

If Buttigieg, 37, wins the nomination and the White House next year, he will be the first openly gay president. The former Navy reserve officer and Afghanistan War veteran used his first response to a question about coming out to address the demonstrators' concerns.

"There is no right or wrong way to be gay, to be queer, to be trans, and I hope that our own community, even as we struggle to define what our identity means, defines it in way that lets everybody know that they belong among us," he said.

[Related: Warren: A man who doesn’t believe in gay marriage might not be able to 'find' a woman]