President Barack Obama has a complicated history with medical marijuana. In his autobiography, and elsewhere, Obama frankly described using marijuana as a teen: “I inhaled frequently. That was the point.” When he was running for president, Obama famously said he wouldn’t be using federal resources to “circumvent state laws on the issue” of medical marijuana. But not long after he got into office, his administration began a crackdown on growers and dispensers in states that had legalized it. By 2012, he had publically changed his tune from 2008, arguing that not to enforce federal anti-pot statutes in states where medical marijuana was legal would be to “nullify congressional law.”

Since then, though, Congress passed a measure explicitly telling the Obama administration to cease spending funds to prevent medical marijuana providers from operating in states that have legalized it. Ironically, Obama has opted to ignore this particular legislation and continues to prosecute these cases, essentially nullifying congressional power. In so doing, the president has not only directly contradicted himself multiple times over, but he has set up a historic clash that threatens the constitutional balance of power between Congress and the executive branch, one that could go all the way to the Supreme Court.

At least 24 states, plus the District of Columbia and various territories, have enacted comprehensive medical marijuana laws. Enterprising individuals in these states are the ones implementing the infrastructure around the laws by growing and dispensing marijuana to qualified patients. They invest capital. They obtain licenses and permits. But, in some cases, the Drug Enforcement Agency and the Department of Justice continue to raid their operations, take their money and marijuana, and send them to federal prison. Under the Constitution’s Supremacy Clause, the DOJ can prosecute medical marijuana providers for federal crimes, even if their conduct is wholly legal under state law. This is not the constitutional question at hand, though.

To be sure, the DOJ allows most state dispensaries to operate without interference and has promulgated nonbinding guidelines limiting federal prosecutions. But the nebulous guidelines give the DEA and DOJ wide discretion for when to prosecute, and defendants have no redress when their cases fall outside of these advisory guidelines. The penalties are harsh. Most operations trigger a mandatory minimum 10-year sentence. Possession of a firearm adds another 5 years.

While many had hoped that Obama would halt federal medical marijuana prosecutions, or make them a low priority, that has clearly not been the case. As Rolling Stone reported in 2012, Obama’s justice department was pacing to exceed George W. Bush’s administration in terms of medical marijuana raids, with more than 100 in his first three years alone. Since then, the administration has continued to prosecute numerous dispensary operators and growers. The National Organization for Reform of Marijuana Laws has a partial list of dozens of pending defendants.

Lawmakers, however, have signaled in the last few years that they have had enough. Congress included a provision in the 2015 spending bill prohibiting the DOJ from using any funds to prevent states that have legalized the use, distribution, possession, or cultivation of medical marijuana from implementing these laws. Reps. Sam Farr, Democrat of California, and Dana Rohrabacher, Republican of California, cobbled together a bipartisan coalition interested in protecting medical marijuana users and dispensaries, protecting states’ rights, and saving money by focusing taxpayer funds on more serious crimes. The same prohibition was renewed for 2016.

Without exception, both those who spoke on behalf of the provision and those who spoke against it made clear that its intent was to stop the DOJ from raiding dispensaries and prosecuting growers, operators, and patients.

In doing so, Congress was using the “power of the purse” as a check on executive power, one of its most important constitutional prerogatives. As James Madison wrote in the Federalist Papers, this power “may, in fact, be regarded as the most complete and effectual weapon with which any constitution can arm the immediate representatives of the people, for obtaining a redress of every grievance, and for carrying into effect every just and salutary measure.”

Despite the firm precedents surrounding Congress’ appropriating power, however, the DOJ remains defiant. Last year, in order to continue trying these cases, the DOJ argued that the bipartisan provision only prohibited prosecuting states and state officials, not individuals involved in the medical marijuana trade. Farr and Rohrabacher fired back a letter calling that interpretation “emphatically wrong” and reiterating that “the purpose of our amendment was to prevent the Department from wasting its limited law enforcement resources on prosecutions and asset forfeiture actions against medical marijuana patients and providers, including businesses that operate legally under state law.”

It would be hard for the amendment’s authors to be any clearer than that. But Farr and Rohrabacher followed up with another letter complaining that the DOJ’s interpretation of the spending prohibition was “a tortuous twisting of the text of [the amendment] and common sense.” In a twist, the pair asked the administration to investigate whether any of its own prosecutors should themselves be prosecuted under the Anti-Deficiency Act that makes it a felony to spend federal funds without authorization.

The DOJ’s interpretation not only defies the intent and plain meaning of the spending prohibition, it is exactly the opposite of what the administration itself said the amendment would do when it lobbied Congress to vote against the measure. The DOJ at that time warned Congress that passing the law would prevent medical marijuana prosecutions and could also hinder recreational marijuana prosecutions.

Hypocrisy aside, the administration’s position has an ugly historic antecedent. After Congress passed the Boland Amendment in the early 1980s prohibiting the use of funds to support the Nicaraguan Contras, members of the Reagan administration attempted to sidestep this spending prohibition. This resulted in the Iran-Contra scandal and led to prosecutions of many of Reagan’s top national security advisors.

While the abuses of the Obama administration are slightly less blatant—mainly because they aren’t being carried out in secret—the principle is the same. And courts have begun to weigh in on this latest constitutional battle. In October, San Francisco federal Judge Charles Breyer granted a motion to prohibit the DOJ from spending funds to enforce a civil injunction that closed down the Marin Alliance dispensary in California. Judge Breyer stated that the DOJ’s interpretation “tortures the plain meaning of the statute” and “is at odds with fundamental notions of the rule of law.”

But other federal district judges in California and Washington have denied motions to prohibit spending on criminal prosecutions of medical marijuana growers and dispensers. The defendants have appealed to the 9th U.S. Circuit Court of Appeals arguing that federal prosecutions and the very threat of them prevent states from implementing their own marijuana laws as they see fit and prevent states from recruiting risk-averse people to implement the infrastructure. The 9th Circuit consolidated appeals in three of these cases with a dozen defendants and heard arguments in December. I am counsel for one of the defendants in these appeals and we are currently awaiting the 9th Circuit decision, which could be appealed to the Supreme Court by either side depending on the ruling.

Although Barack Obama has advocated for ending the use federal resources to “circumvent state laws” on medical marijuana, and advocated for curbing spending, and advocated for reducing lengthy federal drug sentences, his administration continues to defy a Congressional measure that achieves all of these goals. In so doing, it not only meddles in state affairs, it threatens to upset the balance of power between the executive and legislative branches that has served the country since its founding. It’s time for the president to take a deep breath, exhale, and move on.

Correction, April 28, 2016: Due to a production error, the author of this post was originally misidentified as Michael Zilversmit.