Attorney General Jeff Sessions is clearly fired up to fight state marijuana laws. Unfortunately for him, Congress just doused his chances.

The new 1,665-page spending bill maintains a provision that prevents the Department of Justice from using any of its funds to hamper state laws related to medical marijuana. The department cannot “prevent any of them from implementing their own laws that authorize the use, distribution, possession, or cultivation of medical marijuana,” Section 537 of the bill reads.

The $1.1 trillion spending bill—the Consolidated Appropriations Act, H.R. 244 (PDF)—passed the Senate today with a 79-to-18 vote. The White House has signaled that Trump will sign it, which will keep the government running until September.

The section that ties the hands of the Department of Justice on medical marijuana enforcement is not new. It has been around since 2015. But it received little fanfare amid the Obama Administration, which took a lenient stance on enforcing federal marijuana laws in states that legalized use.

All that changed when Jeff Sessions took control of the Department of Justice. Sessions has repeatedly said he opposes legalization and signaled that he would abandon Obama’s lax enforcement position.

For instance, in an April 2016 Congressional Hearing, Sessions proclaimed that “good people don’t smoke marijuana.” When Sessions was asked about enforcement this February at a press conference, he said:

I am definitely not a fan of expanded use of marijuana. But states, they can pass the laws they choose. I would just say, it does remain a violation of federal law to distribute marijuana throughout any place in the United States, whether a state legalizes it or not.

With Section 537, Sessions can still go after recreational use of marijuana in the eight states that have passed such laws. But without funding, Sessions has little ability to fight the medical marijuana laws in 29 states and the District of Columbia.

In a press release, Robert Capecchi, director of federal policies for the Marijuana Policy Project, supported the inclusion of Section 537 in the bill. He also pushed for permanent laws to protect state marijuana policies.