SPRINGFIELD, Ill. (AP) — A group of pastors is suing Illinois over a law that bars therapists from trying to change a minor’s sexual orientation.

The lawsuit filed Thursday in federal court seeks to exclude clergy from the ban that took effect Jan. 1. The lawsuit contends the prohibition shouldn’t apply to clergy because it violates free speech and religious rights.

Illinois is among five states with bans on so-called gay conversion therapy for youth under 18. Laws in California and New Jersey have withstood legal challenges, but an attorney for the pastors says the prohibitions in those states did not include clergy.

Critics of so-called gay conversion therapy argue it’s traumatic and psychologically damaging.