A federal court ruled Friday that the Second Amendment protects the right of individuals to buy and sell firearms.

A panel of three judges from the Ninth Circuit Court of Appeals ruled that "the right to purchase and sell firearms is part and parcel of the historically recognized right to keep and bear arms." Writing for the majority in the case Judge Diarmuid O'Scannlain, a Reagan appointee, said "the right of law-abiding citizens to keep and to bear arms is not a ‘second-class right, subject to an entirely different body of rules than the other Bill of Rights guarantees that we have held to be incorporated into the Due Process Clause.’"

"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. One cannot truly enjoy a constitutionally protected right when the state is permitted to snuff out the means by which he exercises it."

The case revolved around an ordinance in Alameda County, California, which banned gun stores from being located within 500 feet of a residential zone. Three businessmen—John Teixeira, Steve Nobriga, and Gary Gamaz—argued the ordinance violated their Second Amendment rights when they were prevented from opening a gun store. They claimed that the ordinance was intended to keep legal gun dealers from operating in the county.

The Second Amendment Foundation, California Association of Federal Firearms Licensees, and the Calguns Foundation all joined with the three plaintiffs in the case. Alan Gura, who successfully argued landmark gun rights cases Heller and MacDonald, also filed an amicus brief in support of the businessmen.

"This is an important decision," Alan Gottlieb, the founder of the Second Amendment Foundation, said. "It remands the case back to the lower court for further proceedings consistent with the ruling as it pertains to the Second Amendment. We agree with Judge O’Scannlain’s explanation that ‘the county had failed to justify the burden it has placed on the right of law-abiding citizens to purchase guns.’"

"‘The Second Amendment,’ as the judge wrote, ‘requires something more rigorous than the unsubstantiated assertions offered to the district court.’"

Donna Ziegler, Alameda County counsel, said officials are considering all their options but vowed to continue defending the ordinance. "Our intent is to continue to defend our ordinance," she told the Wall Street Journal.

Gottlieb doubts the case will end up being reheard by the full Ninth Circuit Court or by the Supreme Court. "We hope that it is not appealed and have reason to believe that it will not be," he told the Washington Free Beacon. "If it is, we will fight to win."

The case will now go back to the federal trial court, which had dismissed the case in 2013.