(Bloomberg) -- A federal judge threw out a lawsuit filed by Glock Inc., Smith & Wesson Brands Inc. and other gun makers challenging a 2021 New York statute authorizing the state to sue them over some gun violence.

The state law isn’t preempted by the federal Protection of Lawful Commerce in Arms Act of 2005, which shields firearms manufacturers from most liability for violence, because it targets how they market their products, US District Judge Mae A. D’Agostino ruled Wednesday in Albany, New York.

“Congress clearly intended to allow state statutes which regulate the firearms industry,” D’Agostino wrote. “A state statute establishing liability for improper sale or marketing of firearms is not an obstacle to any congressional objective of the PLCAA,” as the federal law is known.

The ruling comes one day after 19 young children and two adults were killed in a mass shooting at an elementary school in Uvalde, Texas, and less than two weeks after a White man killed 10 Black people in a grocery store in Buffalo, New York, in an allegedly racist attack.

In a statement, New York Attorney General Letitia James said the PLCAA was an unprecedented effort by Congress to “usurp states’ rights and give gun manufacturers and distributors blanket immunity.” She called the ruling “a moment of light and hope” at a dark time in the US.

“New York is proud to defend the right to impose reasonable gun restrictions that protect all of us,” James said. “As public officials, we were elected to solve problems and address the needs of the people. Prayers alone will no longer do.”

Military-Themed Ads

The companies’ lawyer, Scott Chesin of Shook Hardy & Bacon LLP in New York, didn’t immediately return a phone call seeking comment.

Claims against a gun manufacturer over marketing were also upheld by the Connecticut Supreme Court in the wake of the 2012 Sandy Hook elementary school massacre. Victims’ parents claimed the shooter had responded to military-themed ads for Remington Arms Co. assault rifles. The company subsequently settled the suit for $73 million.

The suit was filed against James, a Democrat who has frequently clashed with the gun industry. She filed an unsuccessful suit seeking to dissolve the National Rifle Association over allegations of financial fraud.

The case is National Shooting Sports Foundation Inc. v. James, 1:21-cv-01348, U.S. District Court Northern District of New York (Syracuse).

(Updates with comment from New York attorney general.)

©2022 Bloomberg L.P.