A federal judge in California, on Friday, reversed a ban on assault weapons saying that the restrictions, which were in place for a long time, violated the Second Amendment of the US constitution.

Roger Benitez, a federal judge of the city of San Diego, ruled that the residents of California were being deprived of owning their right to own such weapons. He later passed a permanent injunction to remove the decades-long rule.

Judge Benitez, while giving his ruling, compared AR-15 firearms to the Swiss Army Knife by calling both of them “a home defense weapon and homeland defense equipment”, reported CNN.

AR-15s, which were defended by the judge, seem to be a popular choice among mass shooters in the US. The Pulse Nightclub shooting in Orlando, movie theatre shooting in Colorado, Parkland High school shooting in Florida among multiple others have had one thing in common, the kind of weapons used.

California’s Democratic Governor Gavin Newsom has previously condemned the use of AR-15s while calling them “a weapon of war”.

While commenting on Friday’s ruling, Newsom said the decision was “a slap on the face to the families who’ve lost loved ones to this weapon.”

However, the injunction passed by Judge Benitez has been halted for 30 days as California’s attorney general is reviewing the change. The attorney general will also have an option to seek the Court of Appeals to counter the rule, reported CNN.