A bill that seeks to prohibit therapies that attempt to alter the sexual orientation or gender identity of lesbian, gay, bisexual and transgender youth cleared the Massachusetts Legislature on Thursday.

Such therapies go by names such as “conversion therapy,” “reparative therapy,” “sexual orientation change efforts” or “ex-gay therapy.”

Earlier this month, the Massachusetts House overwhelmingly approved the bill.

Thursday's vote in the Senate was equally lopsided, with senators voting 34-0 in favor of the bill with five abstentions.

According to MassLive.com, one Republican, Senator Patrick O'Connor, voted for the bill. Five additional Republicans voted “present.”

The measure now heads to the desk of Governor Charlie Baker, a Republican. Baker has previously said that he's “inclined to support” the bill.

Senate Republicans said that they worried the bill was unconstitutional.

Democrats said that they were confident that is not the case. “It relies on the well-established authority of the state to regulate professional conduct,” Democratic Senator Joan Lovely said.

The Human Rights Campaign (HRC), the nation's largest LGBT rights advocate, cheered the news.

“Children everywhere deserve to live their lives authentically and should never be subjected to the dangerous and discredited practice of so-called conversion therapy. We laud and thank those who voted in the Massachusetts legislature to pass – in a bipartisan fashion – these vital and potentially life-saving protections in the Bay State,” said HRC National Field Director Marty Rouse. “Now, we look forward to Governor Baker’s signing this bill into law, ending this egregious practice in Massachusetts.”

(Related: Puerto Rico governor signs order banning “ex-gay” therapy.)