President Donald Trump said in an interview Thursday that he would be open to voting for a gay candidate for president.

"Would Americans vote for a gay man to be president?" Fox News journalist Geraldo Rivera asked 40 minutes into an episode of his podcast, "Roadkill With Geraldo."

"I think so," Trump said. "I think there would be some that wouldn't, and I wouldn't be among that group, to be honest with you."

"I think that it doesn't seem to be hurting Pete 'Boot-edge-edge,'" Trump said of the openly gay presidential contender, slowly using the phonetic pronunciation of the former South Bend, Indiana, mayor's Maltese surname.

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"But there would certainly be a group," the president repeated, "that probably wouldn't. But you and I would not be in that group."

"We would not," Rivera responded.

Trump has lots of company: A 2019 Gallup poll found that 76 percent of Americans would vote for a gay or lesbian presidential candidate — just behind the 80 percent who said they would vote for an evangelical Christian. Other groups are rated as more acceptable: Over 90 percent of Americans said they would vote for a black, Catholic, Hispanic, female or Jewish candidate.

But there are groups less popular for electoral politics than gay people: Muslims, atheists, socialists, people over 70 and people under 40 (a group that includes Buttigieg, 38).

When Gallup began asking Americans about their willingness to vote for a gay or lesbian presidential candidate in 1978, just 26 percent said "yes."

Last May, though, Trump complained on Twitter that Fox News was "wasting airtime on Mayor Pete."

Hard to believe that @FoxNews is wasting airtime on Mayor Pete, as Chris Wallace likes to call him. Fox is moving more and more to the losing (wrong) side in covering the Dems. They got dumped from the Democrats boring debates, and they just want in. They forgot the people..... — Donald J. Trump (@realDonaldTrump) May 19, 2019

In that same thread, Trump made a prediction about Buttigieg, whom he referred to using the name of the iconic Mad magazine cover boy: "Alfred E. Newman will never be President!"

By December, however, Trump appeared to marvel at Buttigieg's unexpected success: "Can you believe he is doing well, he is like the leading fundraiser," he said of Buttigieg during a 90-minute rally in Hershey, Pennsylvania. "I dream about him, it's true."

Follow NBC Out on Twitter, Facebook & Instagram