Attempting to change youngsters' sexuality, in what is known as "gay conversion therapy," became illegal in Illinois, after Gov. Bruce Rauner signed a bill banning the practice on Thursday, the Associated Press reported.

The Illinois Legislature had passed the measure, which goes into effect on Jan. 1. The new law keeps therapists from trying to change the sexual orientation or gender identity of a person younger than 18.

Samantha Ames, a staff attorney with the National Center for Lesbian Rights, on Thursday praised the Republican governor's move, Newsweek noted.

"Illinois families can now have confidence that the mental health professional they turn to in times of uncertainty may not use their state license to profit from their children's pain," she said in a statement. "Most importantly, Illinois kids can now rest easy in the knowledge that they cannot be forced or coerced to undergo dangerous and discredited treatments to fix who they are." 

Her approval was echoed by Chad Griffin, the president of the Human Rights Campaign, who told Towleroad that "conversion therapy" had been "discredited by every major mental health, medical, and child welfare organization."

The approach "uses fear and shame to tell young people the only way to find love and acceptance is to change the very nature of who they are," Griffin said. "We thank Governor Rauner ... for putting politics aside and the well-being of children first."

Proponents of "conversion therapy," however, said they worried that that therapists may be punished unfairly due to the law. The legislation also limits parents' treatment decisions, they added, according to the Associated Press.

But the approach to change a person's sexual orientation through behavioral therapy does not work, according to the American Psychological Association, which noted that many individuals who have been through such programs say they actually cause psychological damage.

Alluding to the therapy's "devastating effects," President Barack Obama has called for an end to the practice, and California and New Jersey have enacted bans similar to that in Illinois.