Tucked deep inside the 1,603-page federal spending measure is a provision that effectively ends the federal government's prohibition on medical marijuana and signals a major shift in drug policy.
The bill's passage over the weekend marks the first time Congress has approved nationally significant legislation backed by legalization advocates. It brings almost to a close two decades of tension between the states and Washington over medical use of marijuana.
Under the provision, states where medical pot is legal would no longer need to worry about federal drug agents raiding retail operations. Agents would be prohibited from doing so.
The Obama administration has largely followed that rule since last year as a matter of policy. But the measure approved as part of the spending bill, which President Obama plans to sign this week, will codify it as a matter of law.
Pot advocates had lobbied Congress to embrace the administration's policy, which they warned was vulnerable to revision under a less tolerant future administration.
More important, from the standpoint of activists, Congress' action marked the emergence of a new alliance in marijuana politics: Republicans are taking a prominent role in backing states' right to allow use of a drug the federal government still officially classifies as more dangerous than cocaine.
"This is a victory for so many," said the measure's coauthor, Republican Rep. Dana Rohrabacher of Costa Mesa. The measure's approval, he said, represents "the first time in decades that the federal government has curtailed its oppressive prohibition of marijuana."
By now, 32 states and the District of Columbia have legalized pot or its ingredients to treat ailments, a movement that began in the 1990s. Even back then, some states had been approving broader decriminalization measures for two decades.
The medical marijuana movement has picked up considerable momentum in recent years. The Drug Enforcement Administration, however, continues to place marijuana in the most dangerous category of narcotics, with no accepted medical use.
Congress for years had resisted calls to allow states to chart their own path on pot. The marijuana measure, which forbids the federal government from using any of its resources to impede state medical marijuana laws, was previously rejected half a dozen times. When Washington, D.C., voters approved medical marijuana in 1998, Congress used its authority over the city's affairs to block the law from taking effect for 11 years.
Even as Congress has shifted ground on medical marijuana, lawmakers remain uneasy about full legalization. A separate amendment to the spending package, tacked on at the behest of anti-marijuana crusader Rep. Andy Harris (R-Md.), will jeopardize the legalization of recreational pot in Washington, D.C., which voters approved last month.
Marijuana proponents nonetheless said they felt more confident than ever that Congress was drifting toward their point of view.
"The war on medical marijuana is over," said Bill Piper, a lobbyist with the Drug Policy Alliance, who called the move historic.
"Now the fight moves on to legalization of all marijuana," he said. "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."
The measure, which Rohrabacher championed with Rep. Sam Farr, a Democrat from Carmel, had the support of large numbers of Democrats for years. Enough Republicans joined them this year to put it over the top. When the House first passed the measure earlier this year, 49 Republicans voted aye.
Some Republicans are pivoting off their traditional anti-drug platform at a time when most voters live in states where medical marijuana is legal, in many cases as a result of ballot measures.
Polls show that while Republican voters are far less likely than the broader public to support outright legalization, they favor allowing marijuana for medical use by a commanding majority. Legalization also has great appeal to millennials, a demographic group with which Republicans are aggressively trying to make inroads.
Approval of the pot measure comes after the Obama administration directed federal prosecutors last year to stop enforcing drug laws that contradict state marijuana policies. Since then, federal raids of marijuana merchants and growers who are operating legally in their states have been limited to those accused of other violations, such as money laundering.
"The federal government should never get in between patients and their medicine," said Rep. Barbara Lee (D-Oakland).