President Donald Trump has called Democratic presidential hopeful Beto O'Rourke a “wacko” for proposing that religious institutions opposed to same-sex marriage lose their tax-exempt status.

On Thursday, nine presidential candidates discussed LGBT issues during an HRC-sponsored town hall broadcast on CNN during prime time.

(Related: Nine Democratic presidential candidates discuss LGBT issues on prime time.)

During the event, moderator Don Lemon asked O'Rourke, a former congressman from Texas, whether “religious institutions … should lose their tax-exempt status if they oppose same-sex marriage.”

“Yes,” O'Rourke answered. “There can be no reward, no benefit, no tax break for anyone or any institution, any organization in America that denies the full human rights and the full civil rights of every single one of us. And so as president, we’re going to make that a priority and we are going to stop those who are infringing upon the human rights of our fellow Americans.”

Appearing at the Values Voter Summit, an annual conference sponsored by the Family Research Council (FRC), a vocal opponent of LGBT rights, Trump criticized O'Rourke without mentioning his name.

“As you know, just a few days ago, a Democrat running for president proposed revoking the tax-exempt status of many churches and religious groups,” Trump told the crowd. “And you [ask] why. And you know [who] it is. He's a wacko.”

Trump went on to tout his commitment to religious liberty, which to conservative voters is often shorthand for opposition to LGBT rights.

“I will never allow the federal government to be used to target, harass or punish communities of faith and I will never allow the IRS to be used as a political weapon, as it has been and it is currently being used,” Trump said. “It has been used so viciously, so violently against many people in the room.”

Other Republicans have criticized O'Rourke, including Senator Ben Sasse of Nebraska, who denounced O'Rourke for “extreme intolerance” and “bigoted nonsense.”