Medical marijuana advocates are relieved that a bipartisan spending deal to fund the government through September also extended an amendment that protects them from federal prosecution.

The so-called Rohrabacher-Farr amendment blocks the Department of Justice from spending money on medical marijuana prosecutions. If growers and dispensaries carefully follow state rules, they shouldn’t have to worry about the feds coming after them.

The amendment, however, does not apply to the recreational use of marijuana, which California approved through Proposition 64 in November, and which remains vulnerable to federal prosecution.

In 2014 and  2015, Reps. Sam Farr, D-Carmel, and Dana Rohrabacher, R-Costa Mesa, pushed through an amendment that prohibited the federal government from using taxpayers’ funds to enforce federal anti-marijuana laws in states that regulate its medical use.

If Congress hadn’t re-authorized the amendment Sunday as part of a short-term spending package, that protection would have expired.

The protection extends until the end of the fiscal year, which ends Sept. 30.

Advocates of medical cannabis said they were pleased that Congress is maintaining the status quo.

“We are happy to see common sense prevail and for Congress to continue to respect states’ rights as it relates to medical marijuana,” said Mitchell Kulick, partner at the law firm Feuerstein Kulick LLP of New York City, which works with the cannabis industry.  “We believe that the extension of the Rohrabacher-Farr amendment will allow medical marijuana businesses to continue to serve patients in a responsible manner.”

Derek Peterson, CEO of Irvine’s Terra Tech, said, “Stopping federal agencies from interrupting voter approved state medical marijuana laws is the first step in ending the prohibition of cannabis. Without this provision, the industry could potentially be exposed to the risk of federal raids.”