Democratic presidential candidate Pete Buttigieg ripped President Trump on Friday over allegations of past affairs and sexual misconduct while questioning the support the president enjoys from the religious right.

The South Bend, Indiana mayor – a one-time long-shot for the nomination whose surge over the past two months has made him a legitimate contender for the Democratic nomination – drew attention to Trump’s payment to adult film actress Stormy Daniels, who claims she had an affair with Trump. The president has repeatedly denied the affair with Daniels took place.

BUTTIGIEG JOINS FOX NEWS FOR TOWN HALL MODERATED BY CHRIS WALLACE ON SUNDAY,  MAY 19, AT 7 PM IN CLAREMONT, NH

Healso accused leaders of the religious right of “hypocrisy”  for supporting someone like Trump, whom he targeted as morally lacking.

“I’m old enough to remember when Republicans talked a lot about character in the Oval Office,” Buttigieg said in an interview with Fox News.

“And I’m a little bit puzzled that some leading figures on the religious right can look at somebody who has the track record that this president has on everything from the boasting about sexual misconduct to the payoff to somebody he’s having an affair and believe that that person ought to be the moral as well as the political leader of this nation. To put it mildly it seems inconsistent,” the mayor said.

Pointing to Trump’s payment of $130,000 to Daniels, Buttigieg charged that “the revelations about the payoff to the adult film actress he was allegedly having an affair with is just a concern on a moral level, but it has some pretty troubling legal implications too. So sometimes personal conduct and official or legal implications intertwine.”

Buttigieg made his comments one day after the president – in an interview with Fox News – supported Buttigieg’s status as a married gay man. The candidate, if elected, would become the nation’s first gay president.

“I think it’s absolutely fine. I do,” the president told Fox News host Steve Hilton.

“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. I think it’s good,” Trump stressed.

Hilton’s full interview with the president will air Sunday night on the Fox News Channel.

Buttigieg on Friday also took aim once again at Vice President Mike Pence, accusing the former Indiana governor of advancing “homophobic policies.”

“I don’t know what’s in his heart,” Buttigieg said in an interview conservative radio host Hugh Hewitt that aired Friday. But he added that “if you’re in public office and you advance homophobic policies, on some level it doesn’t matter whether you do that out of political calculation or whether you do it out of sincere belief.”

“The problem is, it’s hurting other people,” Buttigieg pointed out.

Buttigieg and Pence have bene clashing in recent weeks over issues affecting the LGBT community.

PENCE WARNS CHRISTIAN GRADUATES TO PREPARE FOR RIDICULE FROM 'SECULAR LEFT'

In a Fox News interview earlier this week, the vice president said it was “disappointing” to see both Buttigieg and former Vice President Joe Biden criticizing him on the campaign trail.

And pointing to Buttigieg, Pence teased that "if he wins their party’s nomination, we’ll have a lot more to say about him."

Last month Pence accused Buttigieg of attacking his faith to stand out in a crowded Democratic primary field of contenders.