The D.C. Council on Tuesday voted to take a final step this year for gay rights, banning conversion therapy that seeks to turn gay teenagers into heterosexuals.

The unanimous council vote puts the District in the rare company of only California and New Jersey to ban the practice. It also raises the possibility that after legal challenges to bans in those states recently failed that similar efforts may proceed elsewhere.

In advancing the measure to the council, member Yvette Alexander (D-Ward 7) chair of the health committee, said the ban would end in the District what nationwide has been a “problem for years.”

The bill, authored by council member Mary M. Cheh (D-Ward 3), bans efforts by licensed mental health providers to seek to change a minor’s sexual orientation “including efforts to change behaviors, gender identity or expression, or to reduce or eliminate sexual or romantic attractions or feelings toward a person of the same sex or gender.” It was opposed by the Family Research Council and some religious organizations.

“While steps toward remedying the counterproductive anti-homosexual mindset have been taken,” Alexander wrote, “this measure will serve as a crucial step in that long battle.

In a statement, Sarah Warbelow, legal director for the pro-gay Human Rights Campaign, praised the decision but cast it as incremental step.

“While the LGBT youth in our nation’s capital will soon be protected once this bill is signed into law,” Warbelow said, “HRC is committed to making sure these kinds of protections are secured throughout the entire nation.”

In Maryland, a similar measure that was a priority for gay lawmakers died this year when it was withdrawn amid concerns it would not pass the General Assembly. Advocates vowed to make some of the changes through regulatory changes.