COPENHAGEN, Denmark (AP) — Danish prosecutors have charged a 49-year-old imam for making public remarks against homosexuals, whom he compared to pedophiles.

Prosecutor Jan Reckendorff says the unidentified imam violated Denmark’s penal code in 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.

Reckendorff said Friday the remarks “were so rough” that a court of law must now decide whether Danish law has been violated.

No date for a trial was immediately set.

The imam faces a fine or up to two years in jail if found guilty of making comments deemed threatening, insulting or degrading to a group of persons because of their race, color, national or ethnic origin, belief or sexual orientation.