A U.S. district judge has dismissed Florida Agriculture Commissioner Nikki Fried’s lawsuit challenging the federal laws that govern medical cannabis and firearms.

Judge Allen Winsor granted the Department of Justice’s (DOJ) request to dismiss the case, which claimed that current regulations that prohibit medical cannabis patients from buying and possessing guns violate Second Amendment rights, according to a CBS Miami report.

Winsor issued the 22-page ruling Nov. 4, the news outlet reported.

Fried announced her plan to sue the Biden administration in April, taking aim at a conflict between state and federal law. While Florida’s 2016 medical cannabis law allows registered patients to legally purchase and use cannabis in the state, it remains illegal at the federal level, and federal laws prohibit those who use illegal drugs from buying and possessing firearms.

“No patient should have to choose between their medicine and employment, or a roof over their head, or access to capital—or their constitutional rights,” Fried said in a public statement upon filing the lawsuit earlier this year. “While we continue to call for full cannabis legalization to resolve the many issues caused by irrational, inconsistent, and incoherent federal cannabis policies, we are here today to announce we are filing suit against the federal government over its violation of patients’ Second Amendment rights due to federal law deeming it illegal for a medical marijuana cardholder to purchase a firearm.”

The lawsuit alleged that federal law prohibits “Floridians from possessing or purchasing a firearm based on the sole basis that they are state-law-abiding medical marijuana patients,” according to CBS Miami. Plaintiffs also claimed their position was supported by the Rohrabacher-Farr Amendment, an amendment that prohibits the DOJ from using federal dollars to bar states from enacting their own medical cannabis laws and that has been renewed each year through spending bills.

In his ruling Friday, Winsor cited the Supremacy Clause in the U.S. Constitution and stated that cannabis is still federally illegal, even though Florida has legalized its use for medical purposes, the news outlet reported.

“In 2016, Florida stopped criminalizing the medical use of marijuana,” Winsor wrote, according to CBS Miami. “Many people refer to this change as Florida’s ‘legalizing’ medical marijuana, but Florida did no such thing. It couldn’t. ‘Under the Supremacy Clause of the Constitution, state laws cannot permit what federal law prohibits,’ and federal law still prohibits possession of marijuana—for medical purposes or otherwise.”

He also rejected plaintiffs’ argument regarding the Rohrabacher-Farr Amendment, CBS Miami reported, saying: “Regardless of whether plaintiffs are prosecuted (or whether Congress allocates funds for their prosecution), possession of marijuana remains a federal crime. The Rohrabacher-Farr Amendment at best precludes prosecution now; it does not forever bless plaintiffs’ actions.”