SACRAMENTO, Calif. (CN) – California’s ban on the possession of high-capacity gun magazines passes constitutional muster, a federal judge ruled Wednesday, though he gave the gun owners a fourth opportunity to make their case.

U.S. District Judge William Shubb also said the law doesn’t violate gun owners’ equal protection rights just because it exempts large-capacity magazines used as props in film and television.

“The court cannot know for certain why this exemption was included,” Shubb wrote in a 23-page opinion issued Wednesday. “Nevertheless, the California electorate could have rationally believed that large capacity magazines used solely as props were not at risk of being used in mass shootings and that such an exception would benefit an important sector of the California economy.”

The measure, Senate Bill 1446, is one of several gun-related bills passed by the California Legislature and signed into law by Gov. Jerry Brown in 2016 to reduce the likelihood of mass shootings in California by banning the possession of gun magazines that hold more than 10 bullets.

While lawmakers in 1999 prohibited the sale, manufacture or importation of high-capacity ammunition magazines – but let those who owned them before that point keep them – SB 1446 forced gunowners with “grandfathered” magazines to turn them in for destruction by July 1, 2017, or face legal consequences.

In November 2016, voters also passed the corresponding Proposition 63, which requires anyone who owns a large-capacity magazine to do one of three things: move it out of state, sell it to a licensed firearms dealer, or surrender it to a law enforcement agency to be destroyed.

This past April, CalGuns Foundation, Firearms Policy Coalition, Firearms Policy Foundation and the Second Amendment Foundation challenged the ban along with seven individuals, including veterans and a retired police officer.

Shubb declined to issue a preliminary injunction in June, and on Wednesday granted the state’s motion to dismiss. He found the law’s requirements do not constitute a taking of private property for government use because there are alternatives to turning the guns into law enforcement.

“The ban does not require that owners turn over their magazines to law enforcement – they may alternatively sell the magazines to licensed gun dealers, remove them from the state, or permanently modify the magazines so that they no longer accept more than 10 rounds. The impracticality of any particular option, such as the alleged lack of a market for these magazines, the burden in removing these magazines from the state, or the lack of guidance on what constitutes a permissible permanent modification does not transform the regulation into a physical taking,” he wrote.

Shubb also rejected the argument that modifying the magazine to hold no more than 10 rounds destroys its functionality, “given that plaintiffs do not allege that owners of these magazines will not be able to use their modified magazines, which would then simply have a lower capacity than before the modification.”

The groups had also argued the law doesn’t do much to prevent mass shootings, but Shubb said it does enough, since the government only has to show a reasonable fit between the ban and its stated intent.

“There can be no serious argument that this is not a substantial government interest, especially in light of the mass shootings involving large capacity magazines, including the 2012 Aurora movie theater shooting and the 2012 Sandy Hook school shooting, which were discussed in Proposition 63,” he wrote.

He said the state’s interest in preventing mass shootings will be less successful absent the ban.

“Because of this reasonable fit, plaintiffs have not sufficiently alleged that the large capacity magazine ban fails intermediate scrutiny, and the court will dismiss the Second Amendment claim.”

In a phone interview Thursday, the groups’ attorney George Lee said he disagreed with Shubb’s finding that the law passes intermediate scrutiny.

The intermediate scrutiny test requires that the law must further an important government interest, and must also do so by means “substantially related” to that interest.

“We obviously disagree that the government can simply show it has some interest in the absence of showing that the remedy will actually have a measurable effect on what the perceived harm is,” Lee said. “The government needs to provide some evidence that there is an actual problem and that their remedy will meaningfully address that problem. There simply is no evidence to show that is the case.”

Lee said that in its attempt to obtain a preliminary injunction last year, his clients showed that even if mass shootings are a problem in California, 20-year-old large-capacity magazines certainly aren’t the motivating force behind them.

“There’s no evidence that any of those magazines are actually used in mass shootings,” he said. “We have shown through looking at some major databases that large-capacity magazines aren’t usually used and when they are used, they certainly aren’t that old.”

Lee pointed to the 2015 mass shooting that killed 14 people in San Bernardino, saying while the perpetrators of the attack used large-capacity magazines, they imported them illegally from another state.

“If there is a problem as far as mass shootings is concerned, certainly law-abiding citizens who have owned these magazines for 20 years is not the problem,” Lee said.

Lee said he is “pursing the idea of an appeal.”

Shubb gave the gun owners 20 days to file a third amended complaint “if they can do so consistent with this order.”

Attorney General Xavier Becerra’s office also did not respond for an email seeking comment.

In other gun-related news in California, a state appeals court on Thursday revived a challenge to the state Department of Justice’s rule barring curio and antique gun owners from purchasing more than one gun in a 30-day period.

The Third Appellate District found the department was not exempt from its duties under the Administrative Procedures Act in adopting the 2014 policy, which the panel also found runs counter to another state law giving holders of federal curio-collector permits a pass on buying limits.