NASHVILLE, Tenn. — A coalition of groups has launched an ad campaign against House Speaker Beth Harwell and other lawmakers over a controversial bill that would allow counselors to refuse to treat patients on the basis of “sincerely held religious beliefs.”

One of the groups is the American Counseling Association. A spokesman for the organization called the measure an unprecedented attack on the counseling profession.

Opponents say the legislation would allow therapists to turn away people in crisis because they are gay, transgender or practice a different religion. Republican Sen. Jack Johnson of Franklin, one of the sponsors of the bill, has said it is aimed at referring patients to people who specialize in their issues.

The bill passed in the Senate last month.

Harwell was not immediately available for comment.