During Thursday's third Democratic presidential debate, South Bend, Indiana Mayor Pete Buttigieg talked about his coming out gay story.

The candidates were asked to discuss a time of personal setback in their lives.

Buttigieg publicly came out gay in 2015 and married last year.

“I came back from the [Navy Reserves] deployment and realized that you only get to live one life, and I was not interested in not knowing what it was like to be in love any longer, so I just came out,” Buttigieg said.

“I had to wonder if just acknowledging who I was was gonna be the ultimate, career-ending political setback.”

Instead, Buttigieg was re-elected by a wide margin.

“What I learned was that … part of how you can win and deserve to win is to know what's worth more to you than winning,” he said.

The moment was historic as many commenters online pointed out.

“This would have been unfathomable just a few years ago,” messaged a user on Twitter.