The headline of a sign that a San Francisco immigration clinic is distributing to marijuana growers and dispensers in California, where personal use by adults has been legal since 2016, gives some dire advice:

Warning: If you are not a U.S. citizen, it may be legally dangerous for you to work in the marijuana industry.

The sign reflects a federal policy announced this year: Not only is cannabis classified under U.S. law as a dangerous and strictly prohibited substance, it’s also potentially toxic for immigrants.

Anything they do to make marijuana available — tending the crops, or even being an accountant or a secretary in a dispensary — is considered evidence of “bad moral character” that can deprive them of a bid for citizenship, a work permit or, in some cases, the right to remain in the country.

“An applicant (for naturalized citizenship) who is involved in certain marijuana-related activities may lack GMC if found to have violated federal law, even if such activity is not unlawful under applicable state or foreign laws,” U.S. Citizenship and Immigration Services declared in a “policy alert.” It was issued April 19 but reflects practices that began much earlier.

GMC stands for “good moral character,” a long-standing legal requirement for those seeking citizenship or green-card work permits. It is usually based on an applicant’s criminal record and can also be invoked to prevent a noncitizen who has left the United States for any reason — even for a brief family visit — from returning to the country.

Undocumented immigrants fighting deportation can also be affected. Those who have lived in the United States for more than 10 years can avoid removal by showing that it would cause hardship to family members who are U.S. citizens, but not if the immigrant lacks “good moral character.”

And under the federal policy, proof of disqualifying “marijuana-related activities” doesn’t require federal prosecution and conviction. Instead, immigrants can be snared by their own statements to federal officers.

“You are asked, ‘Have you ever used illegal drugs,’ and you say, ‘No, just marijuana,’” said San Francisco immigration attorney Zachary Nightingale, describing a typical interrogation of a legal resident seeking citizenship. “Did you possess marijuana in the state? If you say ‘yes,’ you’re automatically disqualified for five years.”

Nightingale said he advises noncitizens who work in marijuana-related businesses to find a new line of work for at least five years before applying for citizenship.

“Immigrants are caught in the middle, often unknowingly,” said Bill Hing, a University of San Francisco law professor and co-director of the school’s Immigration and Deportation Defense Clinic. “They think, ‘I have permission to work, here’s a job that’s legal in California,’ and they take it. They could very well be falling into a federal trap.”

Asked about the policy, U.S. Citizenship and Immigration Services responded, “Federal law does not recognize the decriminalization of marijuana for any purpose, even in places where state or local law does.”

Hing’s clinic has been providing pot businesses with the warning signs it obtained from the Immigrant Legal Resource Center, a nonprofit advocacy group in San Francisco. The state Employment Development Department issued its own warning in February, saying noncitizens “who work in the cannabis industry may suffer negative immigration consequences,” including deportation.

The Immigrant Legal Resource Center went further in an advisory notice to potential clients in January 2018.

“Stay away from marijuana until you are a U.S. citizen,” the notice said.

It advised against carrying cannabis, a medical marijuana card or stickers and T-shirts with marijuana messages. It also recommended removing pot-related texts and photos from cell phones and social media. And it said anyone who needs medical marijuana, or who faces questioning by federal agents about the drug, should first consult a lawyer.

As those messages suggest, the federal policy was in place long before the April 19 announcement.

“Perhaps this administration takes a more aggressive posture, but it was the same policy in prior administrations,” said Joe Rogoway, a Santa Rosa attorney specializing in marijuana cases.

He said he has had clients for the past decade who faced immigration penalties because of marijuana. Some, Rogoway said, had been granted political asylum because of persecution in their homeland, but were sent back when they ignored legal advice to steer clear of the cannabis industry. Others, he said, were charged with illegal cultivation under pre-2016 California law, but avoided immigration problems by reaching plea agreements that did not implicate them in federal crimes.

Nightingale, the San Francisco attorney, said immigration officers started asking citizenship applicants last year whether they had used illegal drugs, but the document containing that question had been approved for use in December 2016, a month before President Trump took office.

USF’s Hing said reports of stepped-up immigration penalties are coming mostly from Colorado and Washington, which were also the first states, in 2012, to legalize personal marijuana use. A Colorado resident, Oswaldo Barrientos, told the Associated Press he was denied U.S. citizenship late last year because he worked for a state-licensed marijuana grower.

“I was shocked, appalled, sad,” said Barrientos, 30, who was brought to the U.S. from El Salvador as an infant and received a green card at age 13. “I had no idea I was going to be in this situation.”

The impact is also being felt in Florida, whose voters legalized medical use of marijuana in 2016.

“People are calling me and asking, ‘Should I naturalize?’ and I say, ‘You may not want to’” because of employment in the marijuana industry, said Elizabeth Ricci, an attorney in the state capital of Tallahassee. “Or they may want to go visit Mom and Dad at home, and then they might not be able to come back.

“I think it’s laughable,” Ricci said. “We have people working in pharmacological labs, producing opioids, and they’re not considered controlled substances (under federal law). Here, people working legally want to be U.S. citizens, and yet they’re told, ‘Poor moral character.’”

Bob Egelko is a San Francisco Chronicle staff writer. Email: begelko@sfchronicle.com Twitter:@BobEgelko