The New Mexico House on Wednesday approved a bill that prohibits therapies that attempt to alter the sexual orientation or gender identity of LGBT youth.

According to the Santa Fe New Mexican, nine House Republicans joined 35 Democrats in backing the bill.

The bill passed the Senate last month, but changes made in the House means the bill will return to the Senate before it reaches Governor Susana Martinez's desk.

Opponents of the measure, a group of mostly rural Republicans, argued that the bill would trample religious freedom.

Democratic Representative G. Andres Romero, a co-sponsor of the bill, countered suggestions that a person's sexuality is a choice or that homosexuality is a mental illness in need of a cure.

“Homosexuality is not a mental disorder,” Romero told colleagues.

Four years ago, New Jersey became the second state after California to enact such a law. Illinois, Oregon, Vermont and the District of Columbia have passed similar bans, while New York Governor Andrew M. Cuomo last year issued an executive order that protects youth from such therapies.

(Related: New York Gov. Andrew Cuomo takes action to prevent “ex-gay” therapy on minors.)