A federal judge in California ruled that a law requiring background checks to purchase ammunition violates the Second Amendment.

Voters approved toughening California firearms laws to include background checks on ammo purchases in 2016, and the restrictions took effect last July. The California Rifle & Pistol Association filed a lawsuit against the state shortly after.

U.S. District Judge Roger Benitez called the law “onerous and convoluted” and “constitutionally defective.”

ADVERTISEMENT

“The experiment has been tried. The casualties have been counted. California’s new ammunition background check law misfires and the Second Amendment rights of California citizens have been gravely injured,” Benitez, a Bush appointee, wrote in the ruling.

Attorney General Xavier Becerra Xavier BecerraOVERNIGHT ENERGY: Trump casts doubt on climate change science during briefing on wildfires | Biden attacks Trump's climate record amid Western wildfires, lays out his plan | 20 states sue EPA over methane emissions standards rollback 20 states sue EPA over methane emissions standards rollback Investigation underway after bags of mail found dumped in Los Angeles-area parking lot MORE claimed in court filing that the law prevented 750 criminals from purchasing ammo, according to The Associated Press.

Last year Benitez struck down the state’s ban on high-capacity ammunition magazines which sparked a weeklong buying frenzy. Gun owners also stockpiled ammunition before the new restrictions took effect last summer, according to the AP.

The National Rifle Association has sued California and New York for requiring gun stores to close in their states as part of their stay-at-home orders requiring nonessential business to shutter during the coronavirus outbreak.