When Californians approved Proposition 64 to legalize marijuana in California last November, it was no secret that the drug would remain illegal under federal law. But that fundamental contradiction seemed manageable at the moment because the federal government had largely taken a hands-off approach to states that had already allowed the recreational sale and use of marijuana, and candidate Donald Trump had said he would let states decide on legalization.

The risk of a clash with the federal government seemed low compared with the benefit of replacing the state’s quasi-legal medical marijuana regime and its underground market for recreational pot with a regulated and controlled system for adults. That’s one reason The Times endorsed the proposition last year.

[related_articles location=”left” show_article_date=”false” article_type=”automatic-primary-section” curated_ids=””]Now, however, we have President Trump, who seems to have forgotten his laissez faire stance on marijuana, and Atty. Gen. Jeff Sessions, who comes from the “Reefer Madness” school of law enforcement. Proponents of Proposition 64 — both the advocates of legalization and the businesses preparing to come out of the shadows into a legalized market — rightly worry that the federal government may decide to crack down on cannabis operators even if they fully comply with state rules.

It’s understandable that state lawmakers want to resist potential federal intervention. But a proposal to make California a so-called sanctuary state for marijuana is not the way to go.

Assembly Bill 1578 would prohibit state and local agencies from using public resources to assist the federal government in investigating or arresting someone for marijuana activity that is allowed in California, unless the federal government has a court order. The author, Assemblyman Reginald Jones-Sawyer (D-Los Angeles), said the bill would ensure that police departments and other agencies don’t use taxpayer dollars to help undermine the will of the voters.

He’s modeled the legislation on Senate Pro-Tem Kevin de Leon’s Senate Bill 54, the “sanctuary state bill,” which would limit state and local agencies’ cooperation in immigration enforcement.

Like SB 54, AB 1578 has raised concerns among law enforcement groups, which argue that local and federal authorities need to work together for public safety and shouldn’t be overly restrained in their communications.

There are notable differences, however, between immigration laws and drug laws. Immigration is a strictly federal issue, and state and local governments should not be involved in enforcement — it’s not their job.

On drug enforcement, however, there is considerable overlap. Local authorities often work with federal agencies on investigations that may uncover both state and federal violations, such as money laundering, diverting marijuana out of state for sales, and environmental damage from outdoor pot farms. The Jones-Sawyer bill would likely bar such cooperation if the target of the investigation is a licensed cannabis business in California. But just because an entity is licensed doesn’t mean it is following the law.

State lawmakers in Washington and Colorado also considered sanctuary-like bills this year that would have barred local law enforcement and other public employees from assisting in federal crackdowns on people engaging in the marijuana activities the state had authorized. Colorado’s bill died amid concerns that it could make it too difficult to conduct joint investigations into marijuana operations that were suspected of violating state laws in addition to federal ones. Washington’s bill was spiked because of worries that it might antagonize and provoke the federal government — a fear echoed by the California League of Cities and other groups.

Oregon, meanwhile, passed a law that bars pot shops from keeping customer data, lest the federal government attempt to subpoena that information.

The federal government has certainly exercised ham-handed enforcement in the past, including targeting medical marijuana businesses that were authorized by their states. California lawmakers are right to be wary, and if Trump and Sessions do try to wreak havoc on cannabis users and businesses that abide by state law, legislators may ultimately have to respond. But rather than pick a fight now with the Trump administration that they may lose, legislators would do better to partner with other anti-prohibition states to lobby for a revision of federal marijuana laws or at least for a permanent federal policy shielding states with responsible cannabis regulatory regimes from federal enforcement.

Congress just approved a four-month extension of an amendment that has successfully prohibited the Department of Justice from spending federal funds to prosecute medical marijuana businesses that comply with their states’ laws. That amendment should be extended further and could be broadened to include recreational marijuana. Rep. Dana Rohrabacher (R-Costa Mesa) has introduced the Respect State Marijuana Laws Act of 2017 that would protect individuals from federal prosecution if they are adhering to state cannabis laws.

The number of states trying to end the prohibition on marijuana in favor of regulating it is growing, with Vermont, New Jersey and Delaware, among others, advancing proposals to legalize adult recreational use. And so far the Trump administration has not attempted to impede those efforts. It may be too much to expect Washington to stay this enlightened course, but Californians knew they were taking that risk when they voted for Proposition 64.

© 2017 Los Angeles Times (Los Angeles, Calif.) Visit The Times at www.latimes.com Distributed by Tribune Content Agency, LLC.