Gun restrictions applying to medical marijuana patients don’t violate any constitutional rights, a US appeals court has ruled. The decision comes in response to a Nevada woman, who accused the government of breaching her Second Amendment rights.

The Ninth US Circuit Court of Appeals unanimously voted 3-0 in support of the government’s power to ban medical marijuana card holders and users from buying arms.

Senior District Judge Jed Rakoff said that the ban was justified because using marijuana "raises the risk of irrational or unpredictable behavior with which gun use should not be associated,” according to the Associated Press.

Under the federal “Gun Control Act of 1968,” users of illicit drugs or anyone “addicted to any controlled substance” is banned from owning, transporting or receiving a firearm. While it does not specifically refer to medical marijuana patients, it is implied that they are falling in that category of people, who can exercise their right to carry a gun.

On top of that, in 2011, the Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF) sent a letter to federal gun retailers instructing them to not sell firearms to “any person who uses or is addicted” to marijuana. This applied to all states regardless of whether medical cannabis was allowed there or not.

"There are no exceptions in federal law for marijuana purportedly used for medicinal purposes, even if such use is sanctioned by state law," the ATF said.

However, S. Rowan Wilson, a medical technician from Nevada, disagreed with the federal government, suing for breaching the Constitution of the United States.

Wilson said in the suit that she tried to buy a Smith & Wesson .357 magnum pistol, but the firearms dealer refused to sell her the weapon, because she has a medical marijuana card.

In 2011, Wilson and her lawyer accused Attorney General Eric Holder and the ATF of violating the Second Amendment, which recognizes the individual right to bear firearms.

"The defendants have prohibited a certain class of law-abiding, responsible citizens from exercising their right to keep and bear arms; the defendants have enacted policies, procedures and customs with the specific intent of denying the Second Amendment rights of persons who have registered to use medical marijuana pursuant to and in accordance with state law,” Wilson wrote in her complaint.

The woman also said that the ban was violating her Fifth Amendment right to due process, because medical marijuana users were automatically assumed to be unlawful users of controlled substances.

However, the court rejected Wilson’s complaint and agreed that it was reasonable for the government to assume that a medical marijuana card holder is more likely to use the drug.

The Ninth Circuit’s ruling applies to all nine states under its jurisdiction, including Washington and Oregon, where both recreational and medical marijuana are allowed. Despite Colorado and the District of Columbia also legalizing recreational marijuana, as well as 25 states opting to allow medical marijuana, it remains illegal under federal law.