As part of a therapy program his parents sent him to, Samuel Brinton said he had wires wrapped around his hands that would heat up when pictures were shown of men touching other men, with the heat turning off when the images were of men touching women.

Brinton, a former Massachusetts resident who now lives in Washington, D.C., told lawmakers Tuesday that the physical aversion therapy was part of an effort to stop him from identifying as gay, which also included his therapist telling him the government had killed off gay children and that his god did not love him.

“I literally would hide from my father because I thought even touching him would hurt me,” Brinton said.

Brinton and others who have undergone what’s known as conversion therapy – intended to change sexual orientation or gender identity – shared stories with the Joint Committee on Children, Families and Persons with Disabilities as they testified in support of bills that would ban the use of such practices for minors in Massachusetts.

Speakers at the hearing described experiences with conversion therapy recently and decades ago, in Massachusetts and in other states.

Diego Miguel Sanchez, a transgender man who serves as policy director for the national nonprofit Parents, Families and Friends of Lesbians and Gays, said that he went through 18 months of conversion therapy sessions to address his gender identity, where he was told how to sit, what to wear and “how to be a little lady.”

“Those 50-minute sessions were calculated to erase me,” he said.

Rep. Tricia Farley-Bouvier, a Pittsfield Democrat who serves on the committee, said she has heard testimony on the bill for three legislative sessions and each time was “astounded by” the personal accounts.

“Your stories say exactly why we need this legislation passed,” she said. “It’s for the protection of minors and it’s quite frankly a consumer protection bill for parents, for parents who are in a situation where they’re confused, they’re looking for help.”

The bill would prohibit practices by licensed professionals that attempt or purport “impose change of an individual’s sexual orientation or gender identity, including but not limited to efforts to change behaviors or gender expressions, or to eliminate or reduce sexual or romantic attractions or feelings toward individuals of the same sex.”

A conversion therapy ban bill last session earned favorable reports from the Children and Families Committee and the Joint Committee on Health Care Financing, then was referred to the House where it never emerged for a vote.