A firebrand Muslim cleric noted for sermons calling for gay people to be executed reportedly preached at an Orlando-area mosque just weeks before a homegrown terrorist gunned down at least 49 people at a gay nightclub.

Sheikh Farrokh Sekaleshfar, a British-born scholar who currently lives in Iran and travels the world to spread his hateful message, preached at the Husseini Islamic Center in the Orlando suburb of Sanford last month. The sermon -- delivered behind closed doors -- was titled, “How to deal with the phenomenon of homosexuality” and raised the ire of local LGBT community leaders.

The sermon came just three years after Sekaleshfar had spoken at another engagement in the U.S. where he discussed his twisted idea of “compassion” for gay people.

“Death is the sentence. There’s nothing to be embarrassed about this. Death is the sentence,” Sekaleshfar said during a 2013 sermon at the University of Michigan, according to Orlando-based WFTV 9. “We have to have that compassion for people. With homosexuals, it’s the same. Out of compassion, let’s get rid of them now.”

Officials for the Husseini Islamic Center said that they were not privy to the sheikh’s prior comments.

“The management at the Husseini Islamic Center were unaware of these remarks when he was invited,” a representative of the Orlando mosque told Fusion.net. “Please understand that the singular views of guest speakers do not represent those of the Husseini Islamic Center. We want to reiterate that nothing, absolutely nothing, can justify yesterday’s atrocious actions.”

The news site also received comment from Sekaleshfar via Facebook in which he referred to shooter Omar Mateen as “an ill and perverted, animalistic entity who has abused an ideology to satiate his sad, twisted desires.”

“I am totally against the barbaric act of violence that has happened. In no way at all can such a killing be justified Islamically,” he said.

When asked about his alleged comments in March in Orlando regarding gays, Sekaleshfar chalked it up to “academic discussion” and that he was describing a “theoretical angle as to what Islam says.”

“I never gave the call to a death sentence,” he told Fusion, adding that his speech in 2013 had been taken out of context. “I was explaining what Islamic law – in a country whose people democratically desired Islamic law to be exercised – states in relation to NOT homosexuals, but rather in relation to when the act of anal copulation is executed in such an aforementioned public.”