Congress made history yesterday. With a 56-40 bipartisan vote, the Senate approved a sweeping $1.1 trillion spending package that will keep keep the government running through the next fiscal year. But beyond avoiding another government shutdown, the billincludes an amendment that will effectively block the Department of Justice from arresting or prosecuting anyone who sells or uses medical marijuana in the 32 states that currently have some type of medical pot law on the books.

The so-called "cromnibus" bill — which still requires President Barack Obama's signature before it officially becomes the law of the land — will likely affect several pending federal criminal cases, and almost certainly make DEA raids of law-abiding dispensaries a thing of the past. The legislation also stands to derail civil asset forfeiture cases in California, where federal prosecutors have used the tactic in attempt to shutter dispensaries in the Bay Area and Orange County.

The new rules also contain protections for industrial hemp, the production of which has been legalized in 18 states and is being considered by more than a dozen others. Obama approved a law in February that sanctioned state-level industrial hemp production, but just three months later the DEA nevertheless seized a batch of hemp seeds in Kentucky.

Is Congress about to make weed in Washington, DC both legal and unregulated? Read more here.

"We applaud this Congress for doing the right thing by protecting the rights of patients, and ending a years-long attack on the medical marijuana community," Mike Liszewski, government affairs director with Americans for Safe Access, a medical marijuana advocacy organization, said in a statement. "By approving this measure, Congress is siding with the vast majority of Americans who are calling for a change in how we enforce our federal marijuana laws."

The weed amendment, first approved by the House in May, was co-sponsored by Rep. Sam Farr (D-Calif.), Reps. Rohrabacher (R-Calf.), Don Young (R-Alaska), Earl Blumenauer (D-Ore.), Tom McClintock (R-Calif.), Steve Cohen (D-Tenn.), Paul Broun (R-Ga.), Jared Polis (D-Colo.), Steve Stockman (R-Texas), and Barbara Lee (D-Calif.). The language specifically blocks the use of DOJ funds to "prevent [medical marijuana states] from implementing their own State laws that authorize the use, distribution, possession, or cultivation of medical marijuana." 

According to Americans for Safe Access, the Obama administration has spent roughly $300 million on enforcement in medical marijuana states since the president took office.

"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 following the Senate vote. "This is great day for common sense because now our federal dollars will be spent more wisely on prosecuting criminals and not sick patients."

If Obama signs the spending bill as expected, the DOJ de-funding measure is scheduled to remain in effect until the end of the current fiscal year, which falls on September 30, 2015. In the meantime, medical pot advocates are working to formalize the policy with standalone legislation. One proposal — HR 689, the "States' Medical Marijuana Patient Protection Act" — would remove marijuana from the list of Schedule I controlled substances (where it currently sits alongside heroin, LSD, and other drugs with "no currently accepted medical use"), and allow funding for therapeutic research.

Native American tribes see profit — and pitfalls — in new legal weed rules. Read more here.

"This is a great day for patients and for public safety," Neill Franklin, executive director of Law Enforcement Against Prohibition, said in a statement. "Congress has finally listened to the vast majority of Americans who believe the federal government has no right to interfere in the personal decision to use medical marijuana made by a patient in consultation with his or her doctor."

The spending bill contains language that complicates marijuana legalization in Washington, DC, but the weed amendment does not affect the three states that have legalized recreational marijuana use and sales: Washington, Colorado, and, most recently, Oregon. 

Federal drug laws still stand in direct conflict with state laws that sanction marijuana use, and the DOJ — which oversees the DEA — will still be able to prosecute people for many types of marijuana-related crimes. The spending bill changes also fail to provide relief for medical marijuana business owners who are unable to use deposit their proceeds in banks due to current federal regulations.

"We're very encouraged to see Congress begin to take some legit steps to resolving the state and federal conflict with marijuana law," Erik Altieri, spokesman for the National Organization for the Reform of Marijuana Laws (NORML), told VICE News earlier this week. "There are issues that still need to be resolved with banking and taxation, but this at least shows they can come together in a bipartisan way and stop raiding state-approved medical marijuana."

VICE News reporter Colleen Curry contributed to this article.

Follow Keegan Hamilton on Twitter: @keegan_hamilton