The Illinois House on Thursday rejected a bill which sought to ban “ex-gay” therapy to minors.

The Conversion Therapy Prohibition Act, introduced by state Rep. Kelly Cassidy, was defeated with a 44-51 roll call, the Chicago Sun-Times reported. Twenty-two members did not vote.

“This treatment plan causes depression, causes suicidal actions and is incredibly harmful to children,” Cassidy told colleagues. “The practice of conversion therapy is dismissed by every major scientific organization and should not be utilized. There's not a single scientific basis for one's sex orientation being a disorder.”

“We need to protect our children,” the openly gay Democrat added.

The measure would have prohibited so-called conversion therapy that attempts to turn gay teens straight.

Opponents of the bill argue that it would harm children.

“Cassidy's proposed legislation is destructive, unethical, and dishonest,” the Illinois Family Institute said in a statement. “It depends on unproven, non-factual, non-evidence-based assumptions that even homosexual scholars reject but the public continues to buy hook, line and sinker. The ultimate motivation behind this legislation is to promote the Leftist assumptions of adult homosexuals who seek to wipe disapproval of homosexual acts from the face of the planet even if doing [so] requires deception, harms children, undermines parental rights, and corrodes fundamental First Amendment speech and religious liberty.”

In August, New Jersey became the second state after California to ban the practice.