NASHVILLE, Tenn. (AP) — A bill that would allow mental health counselors to turn patients away based on the counselors’ religious beliefs and personal principles has passed in the House in Tennessee, the latest state to introduce measures that opponents say legalize discrimination against gays, bisexuals and transgender people.

The Senate, which already passed the measure, still would have to approve an amendment adopted by the House.

The bill passed 68-22 Wednesday following a rancorous debate on the House floor. If it is signed into law, Tennessee would be the only state to allow counselors to refuse to treat patients based on their own belief system, said Art Terrazas, Director of Government Affairs for the American Counseling Association. The organization has called the bill an “unprecedented attack” on the counseling profession and government overreach.

Opponents of the measure say it would allow therapists to discriminate against gays and other people who are at their most vulnerable and need therapy. Proponents say it takes into account the rights of everyone, including the therapists.

“We are standing up for everyone’s right when we vote for this bill,” Rep. Matthew Hill, R-Jonesborough, told members before the vote.

Rep. John Ray Clemmons, D-Nashville, tried unsuccessfully to attach several amendments to the bill, including one that would force therapists to treat children who are victims of bullying. He said that Tennessee would be an outlier if it passes the legislation.

“It’s intriguing to me that this body is wanting to stand in the way of people seeking help in the state of Tennessee,” Clemmons said during the debate.

The bill would not allow counselors to turn away people who are in imminent danger of harming themselves or others.

The bill is part of a wave of proposals across the country that would allow people to deny services to gays, transgender and bisexuals based on religious beliefs.

The Tennessee bill goes even further, however: The original version of the bill, first passed by the Senate, based any denial of services on “sincerely held religious beliefs.” The House amended that language to allow counselors in private practice to refuse to treat a client and provide services relating to “goals, outcomes, or behaviors that conflict with the sincerely held principles of the counselors or therapist.” The counselor would have to refer the patient to someone else.

Those in the counseling community say the law as it is written now is so broad that it would allow counselors to turn away patients for virtually any reason. As an example, Terrazas said, a therapist opposed to war or U.S. military policy could refuse to treat a veteran with post-traumatic stress syndrome under the bill.

The Tennessee Equality Project, which supports gay rights, condemned the House passage of the bill and called on the governor to veto the legislation.