(CNN) Marijuana possession, production and distribution, even in states where it is legal, will remain a barrier in many cases to immigrants hoping to gain US citizenship, the federal government said.

Violation of controlled substance laws, including marijuana, "remains a conditional bar to establishing good moral character for naturalization," USCIS said in a policy alert issued Friday.

"Marijuana remains illegal under federal law as a Schedule I controlled substance regardless of any actions to decriminalize its possession, use, or sale at the state and local level," a USCIS spokesperson said in a statement. "Federal law does not recognize the decriminalization of marijuana for any purpose, even in places where state or local law does."

"It's been something that we have been struggling with in Colorado for a while now," said Jeff Joseph, an immigration attorney in Denver, where marijuana use is legal. "There's a number of activities that can be perfectly legal in Colorado that people don't realize constitute as an immigration violation."

Earlier this month, Denver Mayor Michael B. Hancock sent a letter to US Attorney General William Barr asking for Department of Justice guidance on policies that are "negatively impacting" the legal immigration status for people who work in Colorado's cannabis industry.

Read More