A federal judge Wednesday threw out a case lodged by gun-industry members that had sought to invalidate a 2021 law enacted by New York state that allows prosecution of gun-makers for harm caused by guns when manufacturers have knowingly or recklessly endangered the public, such as through failed screening procedures or deceptive advertising.

The ruling, hailed as a victory by state Attorney General Letitia James, comes one day after yet another mass shooting has shaken the U.S., this one the killing of 19 children and two teachers by a lone gunman rampaging through a Texas school.