A federal judge has overturned California’s 32-year old ban on assault weapons.

On Friday, judge Roger T. Benitez of the U.S. District Court for the Southern District of California referred to the ban as a “failed experiment,” prompting criticism from the state’s governor. In a statement, Governor Gavin Newsom called the ruling a “direct threat to public safety and the lives of Innocent Californians.” California prohibited the sale of assault-style weapons in 1989, and the law was challenged in 2019 in a suit filed against the state’s attorney general. Judge Benitez wrote that certain sections of the state’s penal code that defined assault weapons were “unconstitutional and shall be enjoined.”

Judge Benitez wrote that the “Government is not free to impose its own new policy choices on American citizens where constitutional rights are concerned.” He added that the AR-15 rifle in particular was “a perfect combination of home defense weapon and homeland defense equipment,” and compared it to a Swiss Army Knife. Newsom wrote that comparing an assault rifle to a Swiss Army knife “completely undermines the credibility of this decision and is a slap in the face to the families who’ve lost loved ones to this weapon.”

Meanwhile, gun rights advocates celebrated. “It’s clear the judge did his homework on this ruling, and we are delighted with the outcome,” said Alan M. Gottlieb, founder of the Second Amendment Foundation. Brandon Combs, president of the Firearms Policy Coalition, a pro-gun group that brought the 2019 lawsuit to court, said in a statement that the ruling “held what millions of Americans already know to be true: Bans on so-called ‘assault weapons’ are unconstitutional and cannot stand.”