KCBS_740 SAN FRANCISCO (AP) — A federal appeals court has upheld the government’s ban on the sale of guns to medical marijuana card holders.

The 9th U.S. Circuit Court of Appeals said Wednesday the ban does not violate the 2nd Amendment.

READ MORE: Flash Flood Watches Issued As Storm Aims at Fire-Scarred Northern California

The ruling applies to the nine Western states that fall under the court’s jurisdiction, including California, Washington and Oregon.

It came in a lawsuit filed by S. Rowan Wilson, a Nevada woman who tried to buy a firearm in 2011 after obtaining a medical marijuana card.

READ MORE: Magnitude 2.8 Earthquake Rattles East Bay Near Hercules

The gun store refused, citing the federal rule on the sale of firearms to illegal drug users. Marijuana remains illegal under federal law.

An email to her attorney was not immediately returned.

MORE NEWS: New Facebook Whistleblower Says Executives Shrugged as Algorithm Stoked Hate, Misinformation

© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.