After decades of a war against medical marijuana, Congress made history this weekend after approving a bill that will effectively end the federal government’s ban on selling or using pot for health reasons in states where it’s legalized.

The new measure includes an amendment that prohibits the Department of Justice from arresting or prosecuting anyone selling or using medical marijuana in the states that have legalized its use in treatments. The bill will halt the DOJ from preventing medical marijuana states “from implementing their own State laws that authorize the use, distribution, possession, or cultivation of medical marijuana,” it states.

Though Democrats have been advocating such a measure for years, it was the support of Republicans this time that pushed the numbers over the top — passing it at a 56-40 bipartisan vote.

“The war on medical marijuana is over,” Bill Piper, a lobbyist with the Drug Policy Alliance, told the Los Angeles Times. “Now the fight moves on to legalization of all marijuana. This is the strongest signal we have received from Congress [that] the politics have really shifted. …Congress has been slow to catch up with the states and American people, but it is catching up.”

A Great Day For Common Sense

As of now, 32 states as well as the District of Columbia have legalized medical marijuana. Despite the fact that over the past several years, researchers and doctors have argued that marijuana does indeed have medical benefits — whether it eases nausea, headaches, or cancer patients undergoing the pain of chemotherapy — the Drug Enforcement Administration still lists marijuana in the most dangerous category of drugs and considers it worse than cocaine. This logic puts a dent in the nation’s wallet, since the Obama administration has spent nearly $300 million on enforcing the ban on medical marijuana since President Obama came into office, according to Americans for Safe Access.

“The federal government will finally respect the decisions made by the majority of states that passed medical marijuana laws,” Rep. Sam Farr told the Huffington Post. “This is a great day for common sense because now our federal dollars will be spent more wisely on prosecuting criminals and not sick patients.”

Previously, the DEA had raided marijuana dispensaries, arresting people who were complying with state laws but going against federal law. This served as a huge headache for people who relied on medical marijuana to treat their various disorders, and had a free pass in their state but constantly had to check over their backs to make sure the feds weren’t after them.

There’s still some more work to do before recreational marijuana is legalized federally — for one, pot advocates are working toward a proposal known as the “Sates’ Medical Marijuana Patient Protection Act” which would take marijuana off the list of Schedule I controlled substances, which includes LSD, heroin, and other drugs with “no currently accepted medical use.” Such an act would open the door for further much-needed research on the therapeutic effects of weed.

But in the meantime, marijuana advocates are rejoicing. “This is a victory for so many,” Republican Rep. Dana Rohrabacher of Costa Mesa, a coauthor of the bill, said. The bill is “the first time in decades that the federal government has curtailed its oppressive prohibition of marijuana.”