(CNN) President Donald Trump offered his support to one of his 2020 primary rivals, Mayor Pete Buttigieg, who would be the first married gay US president .

"Don't you think it's just great to see the fact that you've got a guy there on the stage with his husband and it's normal?" Fox's Steve Hilton asked.

"I think it's absolutely fine, I do," Trump said.

He agreed with Hilton's assessment that Buttigieg's candidacy is a "sign of great progress," adding, "Yeah, I think it's great. I think that's something that perhaps some people will have a problem with, I have no problem with it whatsoever."

Public opinion on same-sex marriage has shifted significantly in a relatively short period of time. The Supreme Court ruled in favor of same-sex marriage nearly four years ago. A Quinnipiac University poll out earlier this month found that 70% of voters said they are open to electing a gay president. The same poll also discovered, however, that only 36% of voters think the United States is ready to elect a gay president.

Buttigieg, who hails from South Bend, Indiana, sparred with Vice President Mike Pence in April. Pence's stances on LGBTQ issues have faced criticism from gay rights activists.

Pence signed the Religious Freedom Restoration Act while he was governor of Indiana. Critics of the law contend that individuals and businesses could use it to discriminate against the gay community on the basis of religion.

Pence also signaled support for federal funds to be allocated for gay "conversion therapy" on his 2000 US House campaign website, where it said, "Resources should be directed toward those institutions which provide assistance to those seeking to change their sexual behavior."

During remarks at an LGBTQ Victory Fund National Champagne Brunch in Washington, Buttigieg said that he wished "the Mike Pences of the world" understood that their "quarrel" over his sexuality are "with my creator."

Buttigieg later told television host Ellen DeGeneres he was not critical of Pence's faith, but his policies.

"I'm not critical of his faith; I'm critical of bad policies," Buttigieg said. "I don't have a problem with religion -- I'm religious too. I have a problem with religion being used as a justification to harm people and especially in the LGBTQ community."

Pressed by CNN on his stance on Buttigieg's comments, Pence said: "I think Pete's quarrel is with the First Amendment. All of us in this country have the right to our religious beliefs. I'm a Bible-believing Christian."

Asked whether that includes the belief that being gay is a sin, Pence repeated: "I'm a Bible-believing Christian. I draw my truth from God's word."

On the campaign trail in 2016, Trump heralded his status as a "friend" of the LGBT community.

"Ask yourself, who is really the friend of women and the LGBT community, Donald Trump with his actions, or Hillary Clinton with her words?" he said during a campaign event shortly after the Pulse Nightclub shooting in Orlando, Florida.

Earlier this year, US Ambassador to Germany Richard Grenell launched efforts on behalf of the administration to end the criminalization of homosexuality in countries where it's illegal to be gay, a move largely targeted at Iran.

But some of Trump's actions as President have drawn criticism from LGBTQ advocates.

For instance, in March 2017, Trump signed an executive order that nullified an Obama administration initiative to ensure that federal contractors complied with labor and civil rights laws forbidding discrimination based on sexual orientation and gender identity.

And his administration has rolled back protections for transgender people.

Earlier this year, the Supreme Court declined to take up a challenge to Trump's transgender military ban, effectively allowing it to go into effect.

The policy blocks individuals who have been diagnosed with a condition known as gender dysphoria from serving with limited exceptions. It also specifies that individuals without the condition can serve, but only if they do so according to the sex they were assigned at birth.