By Brooke Sopelsa

It's been less than four years since gay marriage was legalized in the U.S., and LGBTQ people still face hurdles in adopting children, joining the military and buying wedding cakes. But on primetime TV Monday night, a remarkable conversation took place: A presidential contender and one of the country’s most-watched cable news hosts discussed the weight of the metaphorical closet and their experiences in coming out as gay.

“You went through college, and then the Rhodes Scholarship process and getting the Rhodes scholarship and going to work for McKinsey and joining the Navy and deploying to Afghanistan and coming home and running for mayor in your hometown and getting elected before you came out at the age of 33,” MSNBC host Rachel Maddow said to Mayor Pete Buttigieg of South Bend, Indiana, on her show Monday night. “I think it would have killed me to be closeted for that long.”

“It was hard,” replied Buttigieg, who announced his bid for the 2020 Democratic presidential nomination over the weekend. “It was really hard.”

“Coming out is hard, but being in the closet is harder,” said Maddow, a fellow Rhodes scholar who came out during college.

In addition to coming out to others, Buttigieg, now 37, revealed it also took him “plenty of time to come out to myself.”

“There were certainly plenty of indications by the time I was 15 or so that I could point back and be like, ‘Yeah, yeah, this kid’s gay,’ but I guess I just needed to not be,” he explained. “There’s this war that breaks out, I think, inside a lot of people when they realize they might be something that they’re afraid of, and it took me a very long time to resolve that.”

In addition to the struggles many people face coming out as gay, at the time Buttigieg was planning to come out, he was also an officer in the United States Navy Reserve and an elected official in Indiana. He told Maddow he assumed at the time that both roles were “totally incompatible with being out.”

Initially, Buttigieg said, the demands of his job as mayor forced him to put his personal life on the back burner.

“I did get a lot of meaning from that work, and in some ways, because it was so demanding, I almost didn’t mind for a sort of inordinately long time that I didn’t have much of a personal life,” he said. “The city was a jealous bride for a long time and kept me busy.”

However, a seven-month deployment to Afghanistan in 2014 really put him “over the top.”

“I realize that you only get to be one person,” he told Maddow. “You don’t know how long you have on this earth, and by the time I came back, I realized, ‘I’ve got to do something.’”

Buttigieg came out in a June 2015 op-ed in The South Bend Tribune just before the Supreme Court’s landmark Obergefell v. Hodges decision, which legalized same-sex marriage across the U.S.

“I was well into adulthood before I was prepared to acknowledge the simple fact that I am gay. It took years of struggle and growth for me to recognize that it’s just a fact of life, like having brown hair, and part of who I am,” Buttigieg wrote. “Like most people, I would like to get married one day and eventually raise a family. I hope that when my children are old enough to understand politics, they will be puzzled that someone like me revealing he is gay was ever considered to be newsworthy.”

When Maddow asked if Buttigieg thought coming out could cost him re-election, he revealed he was unsure.

“I felt like I had done a good job by the people of South Bend, and I had some level of trust that I would be rewarded for that with a re-election, but there’s no way to really know,” he said. “There’s no playbook, no executive in Indiana had ever been out, and so it was kind of a leap of faith.”

Buttigieg was re-elected in 2015 with nearly 80 percent of the vote — a wider margin than his election in 2011.

When it comes to the presidential election, Buttigieg said most people are “either supportive or even enthusiastic about the idea of the first out person going this far.” And he’s right: A recent NBC News/Wall Street Journal poll found nearly 70 percent of U.S. voters were either enthusiastic (14 percent) or comfortable (54 percent) with a gay or lesbian presidential candidate. This is up from 43 percent in 2006.

Buttigieg told Maddow at the very least, he hopes his presidential campaign will make it easier “for the next person who comes along.”

The conversion between Maddow and Buttigieg garnered a significant amount of social media attention. The country singer Chely Wright, who is lesbian, revealed she was in “tears” watching the segment.

“I came out 9 years ago and I feel like now— in this very moment— there’s is a tangible shift,” she wrote on Twitter.

FOLLOW NBC OUT ON TWITTER, FACEBOOK & INSTAGRAM