California ban reflects growing unease in the United States about the risks to privacy and civil liberties.

California‘s legislature on Thursday passed a three-year ban on state and local law enforcement from using body cameras with facial-recognition software, the latest curb on technology that some say poses a threat to civil liberties in the United States.

The State Assembly voted 42-18 for the bill, after a vote in favour by the Senate on Wednesday. It will now head to Governor Gavin Newsom to approve or veto. If he backs the bill it would take effect on January 1, 2020.

The legislation prohibits officers from running facial recognition in real-time or after the fact on footage collected by body cameras.

However, police still may use the technology to blur faces in videos disclosed to the public in order to protect individuals’ privacy. The American Civil Liberties Union of Northern California backed the bill but police groups opposed it.

Phil Ting, the bill’s sponsor said Thursday’s vote was important for maintaining trust in communities that have benefitted from the transparency cameras provide.

“If you install software onto those body cameras then you run the risk of really destroying that trust,” he told reporters. “It becomes a tool of surveillance, which was never the goal.”

Risk to free speech

The bill reflects growing discontent in the US over facial recognition which government agencies have used for years and now has become more powerful with the rise of cloud computing and artificial intelligence technologies. San Francisco and Oakland voted this year to ban city personnel from using it.

California is poised to follow states including Oregon that have prohibited facial recognition for officer-worn cameras, which Ting’s bill likens to “requiring every person to show a personal photo identification card at all times.”

This “may chill the exercise of free speech in public places,” the bill says.

A revision this month shortened the proposed law’s duration to three years from seven, addressing concerns that the technology might greatly improve.

The California Police Chiefs Association said on Twitter on Tuesday that the technology is only used to narrow lists of suspects in investigations, not to automate decisions on whom to arrest.