The California Senate on Monday approved a bill that repeals a decades-old gay “cure” mandate from state code, the AP reported.

The law instructed the State Department of Mental Health to conduct research into the “causes and cures of homosexuality.”

In a unanimous 36-0 vote, senators approved the measure without debate. Assembly members approved the law with a 62-0 vote in April. The measure heads back to the Assembly for members to vote on amendments.

The law, placed on the books in 1950, classifies gay men and lesbians as sexual deviants and possible child molesters.

Equality California, the state's largest gay advocate, lobbied for passage of the bill sponsored by Assemblywoman Bonnie Lowenthal, a Long Beach Democrat.

“It's discriminatory, it's insulting and it has got to go,” Lowenthal told the AP in April. “Sixty years is more than long enough.”

Calling the repeal effort “offensive,” the ex-gay group Parents and Friends of Ex-Gays and Gays (PFOX), a group that claims sexual orientation can – and should – be altered, objected to repeal of the law.