If you have a medical marijuana card, the 9th U.S. Circuit Court of Appeals says that you can’t buy a gun.
The court ruled 3-0 on Wednesday that a ban preventing medical marijuana card holders from purchasing firearms is not in violation of the Second Amendment, the Associated Press reports. There are nine western states under the appeals court’s jurisdiction, including Nevada, where the case originated.
A lawsuit was filed in 2011 by Nevada resident S. Rowan Wilson after she tried to purchase a gun for self-defense and was denied based on a federal ban on the sale of guns to users of illegal drugs. Though marijuana has been legalized in some places on a state-by-state basis, it remains illegal under federal law. The court maintained that drug use “raises the risk of irrational or unpredictable behavior with which gun use should not be associated.”
Wilson claimed that she doesn’t actually use marijuana, she simply obtained a card to show her support for its legalization. The appeals court agreed with guidelines from the federal Bureau of Alcohol, Tobacco, Firearms and Explosives that firearms sellers should assume that medical marijuana card holders use the drug.
Chaz Rainey, the attorney representing Wilson, said that he plans to appeal the decision. “We live in a world where having a medical marijuana card is enough to say you don’t get a gun, but if you’re on the no fly list your constitutional right is still protected,” he told the AP. He argued that there should be more consistency in how the Second Amendment is applied.
Alex Kreit, marijuana law expert at the San Diego’s Thomas Jefferson School of Law, expects that this ruling won’t be the last we see of the issue. He told the AP that the ruling may be challenged by people who use medical marijuana who will argue “that they shouldn’t be lumped with other drug users in terms of concerns about violence.”
More must-read stories from Fortune:
—Why 2020 Democratic presidential candidates are flocking to Fox News
—Meet the 2020 Democratic presidential candidates you’ve (probably) never heard of
—These are the U.S. goods affected by the China tariffs
—How to invest during a trade war
—Get up to speed on your morning commute with Fortune’s CEO Daily newsletter