In February, U.S. Immigration and Customs Enforcement (ICE) publicly released video footage of agents knocking at the door of a Los Angeles man wanted for deportation. It was still dark, shortly before dawn, when a man came to the door.

“Good morning, how are you doing?" the agent greeted him, according to the Los Angeles Times. "I’m a police officer. We’re doing an investigation."

The footage ignited a firestorm in the city over what immigration advocates say is a longstanding practice across the country: When ICE agents interact with undocumented immigrants, they often represent themselves as police officers.

“We have repeatedly seen ICE go to people’s homes and coerce people to authorize entry under the mistaken belief that [the agents] are police,” says Michael Kaufman, a senior staff attorney at the ACLU of Southern California. “It undermines public safety in these communities if people feel like they might be getting tricked.”

Less than six months later, California Gov. Jerry Brown has signed a bill, AB 1440, that establishes a difference between California police officers and federal immigration agents. The bill’s fact sheet goes further and stresses that these agents are “not allowed to refer to themselves as a police officer under California State Law.”

But legal experts say neither California nor any other state, city or county has the authority to enforce such a law.

"This bill is not meant to act as a regulation of the federal government," says Kaufman, who supports the legislation. "It's just for the purposes of California law sending a message to the federal government that the state does not agree that this practice is permissible."

The limitations of AB 1440 reflect larger challenges for state and local governments trying to resist federal immigration efforts, especially as cities across the country have dealt with their own controversies regarding this ICE practice. In March, city officials in Hartford, Conn., sharply rebuked ICE agents for wearing uniforms that only said 'POLICE' while trying to lure a woman to a public safety building so they could detain her. The Southern Poverty Law Center accused ICE of deceiving Atlanta residents by stating they were police officers searching for a criminal and for sometimes even showing them photos of a random black man they said was their suspect.

While it is legal for ICE agents to identify themselves as police, the practice becomes illegal once it leads to an unlawful search of a person's home or car. In Texas, lawyers successfully argued that ICE agents violated a woman’s constitutional protections when they identified themselves as police and showed her photos of a stranger to coerce her into letting them into her home.

For their part, ICE representatives say it's necessary for the safety of the officers to be able to identify as police.

"The word 'police’ is a universally recognized symbol of law enforcement in most cultures, an important distinction given that many of the individuals with whom ICE interacts are not native English speakers," ICE spokeswoman Virginia Kice wrote in an email to Governing. "Given the inherently dangerous nature of ICE officers’ work, their ability to quickly establish their identity as enforcement personnel could potentially mean the difference between life and death."

The author of AB 1440, Assemblymember Ash Kalra, was aware that federal immigration agents aren't governed by state law when he introduced the bill. He says the legislation is mainly about communicating to residents that there is a distinction between local police and ICE, as well as communicating California’s stance to federal agents.

“It’s unfortunate, but we as legislators can’t keep ICE from lying,” Kalra says. “If they want to misrepresent themselves, they can do that. But with a bill of this nature, at least we can discourage it and make it clear that [California] does not appreciate it.”

Kalra and Kaufman both hope the law can mitigate some of the damage they say is being done when ICE agents represent themselves as police officers. Since Donald Trump won the presidential election, police departments across the country have reported a spike in undocumented community members' unwillingness to cooperate with law enforcement -- even as victims of or witnesses to crimes.

Federal legislators have also weighed in on the matter. In April, a New York Congressmember introduced a bill that would block ICE from identifying as police officers. But the bill has not gained significant traction and is unlikely to win Republican majorities in both chambers.

That's likely to frustrate public officials in Los Angeles, who co-signed a letter to the federal government back in February urging “in the strongest possible terms that ICE immediately cease this practice in our city.”

“For forty years, the Los Angeles Police Department and the Los Angeles City Attorney’s office have worked to gain the trust, respect and cooperation of all our city’s residents,” wrote Mayor Eric Garcetti, City Attorney Mike Feuer and City Council President Herb Wesson. “When ICE agents targeting immigrants identify themselves as ‘police’ officers, they undermine decades of this work.”