Intending to prevent suicides and shootings, state Senate lawmakers narrowly approved a bill Monday that would require a person to surrender his or her firearms if a judge rules the individual poses a threat to themself or people they live with.

Senate Bill 719 would establish a process for a judge to issue an “extreme risk protection order” if a person is found by clear and convincing evidence to pose a risk of suicide or threat to family members or roommates. If an order is issued, that person would have to surrender his or her deadly weapons within 24 hours to a law enforcement officer, gun dealer or third party.