A large number of states have legalized marijuana use for medicinal purposes, even as the federal government continues to maintain that pot is as dangerous and addictive as heroin. However, even though you can’t currently be prosecuted by the feds for properly obtaining medical marijuana in a state like Nevada, your status as a confirmed marijuana user could be used to prevent you from buying a gun.

Federal laws regarding firearms sales include a prohibition against selling guns to fugitives, convicts, “mental defectives,” and anyone who is an “unlawful user of or addicted to any controlled substance” as defined by the Controlled Substances Act.

As mentioned above, not only does the DEA consider marijuana a controlled substance, but lists it as a Schedule I controlled substance, meaning the agency considers it to be highly addictive, dangerous, and having no legitimate medical application.

Back in Oct. 2011, a Nevada woman attempted to purchase a gun from a firearms retailer outside of Carson City. The owner of the store knew the customer and knew she had recently obtained a medical marijuana registry card from the state.

Only days earlier, the Bureau of Alcohol, Tobacco and Firearms had sent out a notice to all licensed gun sellers clarifying that medical marijuana use, in the eyes of the federal government, still constitutes an unlawful use and “you may not transfer firearms or ammunition to” these potential customers.

The customer need not even admit to being a marijuana user or card holder. If the retailer is aware that a buyer has a medical marijuana card, explained the ATF, “then you have ‘reasonable cause to believe’ that the person is an unlawful user of a controlled substance.”

So even though the Nevada customer did not note on her paperwork that she had the card, the gun owner refused to complete the transaction because he knew she was a cardholder.

Two weeks later, the woman filed a federal lawsuit alleging that this refusal to sell her a firearm violated her First and Second Amendment rights, along with the Equal Protection and Due Process Clauses of the Fifth Amendment. She subsequently claimed that the ATF notice that clarified the legality of selling firearms to medical marijuana users violated the Administrative Procedure Act by effectively making new rules without going through the necessary processes.

In March 2014, a District Court in Nevada granted [PDF] the government’s motion to dismiss the case, noting that while the Second Amendment does protect American’s right to bear arms, that protection is not unlimited.

Additionally, unlike some of the other categories of those barred from buying guns — convicted felons, people who had been previously committed to a mental institution — the lower court noted that drug users can get around this prohibition by ceasing to take the drugs.

The Nevada woman had also argued that the law was overbroad because it could have the effect of barring a vast number of otherwise innocent citizens from owning guns. Again, the court was unconvinced, explaining that “Whether nearly half of the U.S. population engages in conduct that is illegal under federal law does not affect the illegality of that conduct.”

The customer appealed the lower court’s dismissal and today, the Ninth Circuit Court of Appeals issued its ruling [PDF] upholding the earlier decision.

First, the appeals panel found that the Nevada customer lacked standing to challenge the particular part of the law barring gun sales to “unlawful user[s]” or addicts because she never admitted to being either of those things. In fact, notes the court, she has previously stated that she obtained the card but had never used it to acquire medical marijuana.

However, she is allowed to challenge the portion of the law that prohibits firearm or ammunition sales based on “reasonable cause to believe” that the buyer is a drug user.

The appeals court acknowledged that this law — along with the ATF’s interpretation in the notice it sent to gun sellers about medical marijuana — does indeed restrict the plaintiff’s Second Amendment rights, but that the burden is “not severe” because it limits only her ability to acquire new firearms, not her right to possess any she might already have.

The Ninth Circuit noted that the plaintiff “could have amassed legal firearms before acquiring a registry card,” and the laws she’s challenging “would not impede her right to keep her firearms or to use them to protect herself and her home.”

Additionally, explains the court, she could have purchased firearms “at any time by surrendering her registry card, thereby demonstrating to a firearms dealer that there is no reasonable cause to believe she is an unlawful drug user.”

In an effort to counter the plaintiff’s argument that the rules unfairly burden largely non-violent medical marijuana cardholders, the government pointed to studies indicating a link between violent behavior and the use of illegal drugs.

However, the appeals court chided prosecutors for “conflat[ing] registry cardholders with unlawful drug users. While these two categories of people overlap, they are not identical.” Since the plaintiff only has standing to challenge the “reasonable cause to believe” prohibition, any studies about the behavior of known drug users and addicts is not immediately relevant.

That said, the court found that it was reasonable to see a connection between this particular prohibition and the aim of preventing gun violence.

“The connection between these laws and that aim requires only one additional logical step: individuals who firearms dealers have reasonable cause to believe are illegal drug users are more likely actually to be illegal drug users (who, in turn, are more likely to be involved with violent crimes),” explains the court, which conceded that some small number marijuana cardholders may only have the card for expressive purposes, while also concluding “it is eminently reasonable for federal regulators to assume that a registry cardholder is much more likely to be a marijuana user than an individual who does not hold a registry card.”

Yes, admits the Ninth Circuit, enforcing this prohibition on all cardholders will inevitably result in some people who do not use marijuana being barred from buying guns, but points out that “the Constitution tolerates these modest collateral burdens in various contexts, and does so here as well.”

Regarding the plaintiff’s First Amendment claim, the appeals court agreed that obtaining a medical marijuana card is indeed a form of protected free expression. It, however, took issue with her allegation that the ATF’s 2011 medical marijuana notice was part of an organized federal campaign to stamp out state laws legalizing medicinal use of the drug.

“[A]ll the federal government would have needed to do to ‘crush’ the medical marijuana movement would have been to enforce the federal laws prohibiting marijuana possession,” explains the ruling.

Even if you take the plaintiff’s speculation as true, notes the court, it does not “demonstrate that the Government targeted [the plaintiff’s] expressive conduct of acquiring a registry card.” In other words, the court is saying that the gun law does not stop anyone from getting a marijuana card.

“The production, distribution, and use of medical marijuana are not protected by the First Amendment,” explains the order, “and efforts by the Government to impede – or even eliminate altogether – the production, distribution, and use of medical marijuana are not evidence of any conspiracy against free speech.”

Though the Ninth Circuit has affirmed the dismissal of the plaintiff’s case, she still has the option to petition the Supreme Court, though SCOTUS is not obligated to hear the matter.