CONCORD, N.H. — New Hampshire is closer to joining more than a dozen other states in prohibiting defendants accused of manslaughter from using the victim’s gender, gender identity or sexual orientation as a defense.

The House voted 223-118 on Thursday to outlaw what has been called the “gay panic defense.” Supporters said defendants have used it in other places to excuse the murder of members of the LGBTQ community.

Opponents said there was no demonstrated need in New Hampshire for the bill, and that writing into law what someone can’t use as a defense sets a bad precedent.

The bill now goes to the Senate.