RICHMOND, Va. (AP) — Virginia lawmakers passed a bill that will ban the use of a person’s perceived or actual sexual orientation or gender identity as a defense in court for the assault or murder of an LGBTQ person.

Virginia State Capitol

Del. Danica Roem, D-Manassas, introduced House Bill 2132, which passed the Senate 23-15 on Thursday with an amendment.

The House approved the amendment in a 58-39 vote.

The bill now heads to Gov. Ralph Northam’s desk for a signature.

The panic defense has historically been used in cases where a member of the LGBTQ community was attacked because of their actual or perceived sexual orientation or gender identity.