COPENHAGEN, Denmark (AP) — An imam has been given a two-week suspended jail sentence for making public remarks against homosexuals, whom he compared to pedophiles.

The city court in Viborg, 260 kilometers (160 miles) northwest of Copenhagen, said Thursday that Mohamad Jammal had violated Denmark's penal code in newspaper interviews in June 2016 following the attack at Orlando's Pulse gay nightclub, where 49 people were shot dead. Many Muslims consider homosexuality to be sinful.

Jammal, who spoke to the Skive Folkeblad newspaper, was convicted of making comments deemed threatening, insulting or degrading to a group because of their race, color, national or ethnic origin, belief or sexual orientation.

It was not immediately clear whether Jammal would appeal.