Prospective gun shop owners in California's Alameda County may soon be back in business after a new ruling reopens a dismissed case.

Previously, a federal judge had thrown out a case brought by potential gun shop owners who argued a county ordinance banning gun shops from operating within 500 feet of a residential area was unconstitutional.

On Monday, San Francisco's Ninth US Circuit Court of Appeals handed the plaintiffs a partial victory. The court did not determine the legitimacy of either the gun owners’ complaint or the local ordinance restricting firearms sales but said the ordinance would have to be defended by local officials against the Second Amendment right to bear arms.

"Our forefathers recognized that the prohibition of commerce in firearms worked to undermine the right to keep and to bear arms," Judge Diarmuid O'Scannlain wrote in a 34-page opinion for the majority. "If 'the right of the people to keep and bear arms' is to have any force, the people must have a right to acquire the very firearms they are entitled to keep and to bear.”

The 2-1 decision sends the case back to the judge who initially threw out the case.

When the lawsuit was originally dismissed from court, the lower-court judge found the local ordinance to be part of "important governmental objectives,” including ensuring public safety in residential areas.

But the appeals court said in its ruling the local officials had not provided any evidence that the gun sale restriction would accomplish those objectives.

"Alameda County's ordinance may very well be permissible. Thus far, however, the county has failed to justify the burden it has placed on the right of law-abiding citizens to purchase guns," Judge O'Scannlain wrote in the ruling.

The gun shop owners also argued in their lawsuit that the regulations were so strict that no available location within Alameda County would be adequate for a gun shop. While the decision does not specifically validate that claim, it does bolster the shopkeepers' case.

"One cannot truly enjoy a constitutionally protected right when the State is permitted to snuff out the means by which he exercises it; one cannot keep arms when the State prevents him from purchasing them," the ruling states. "Thus, the Second Amendment right must also include the right to acquire a firearm."

Gun rights activists hailed the ruling as a victory for the Second Amendment.

"We're very happy to see the Court take a very principled and reasoned approach to protecting the fundamental, individual right to keep and bear arms," Brandon Combs, executive director at Calguns Foundation, said in a statement.

Representatives from the Alameda County Board of Supervisors have not yet issued comment on the recent decision.

The dissenting voice in the three-member appeals panel was Judge Barry Silverman. He opined that the regulations did not infringe on the right to bear arms, calling the case a “mundane zoning dispute dressed up as a Second Amendment challenge."

This report includes material from Reuters.