SACRAMENTO — Legislation that originally sought to permanently ban California law enforcement agencies from using facial recognition technology in police body cameras has been drastically watered down as it heads for its final votes in the state Capitol.

Assemblyman Phil Ting revised the bill last month to limit the ban to just seven years. He amended it again Friday to last for three years.

“We talked to a number of senators and they had a concern with the length of time, so we decided to shorten the length of time,” said Ting, a San Francisco Democrat who introduced the bill saying the technology amounted to an invasion of privacy that could subject innocent people to police surveillance.

Police have been testing the technology in Oregon, where it’s allowed them to compare suspects’ faces to hundreds of thousands of mugshots, and, in some cases, find their Facebook page, visit their home or make an arrest, the Washington Post reported earlier this year. California law enforcement agencies do not currently use the technology, but Ting said his bill is necessary to get ahead of its introduction as facial recognition software becomes more common at airports, schools and even summer camps.

“We’re doing the legislation to be proactive, because we know the software is not accurate and should not be deployed for law enforcement purposes,” Ting said. “We wanted to make sure we didn’t end up in a situation where we were falsely accusing or falsely arresting people.”

But numerous law enforcement groups have objected to the measure, arguing it will impede them from using emerging technology that could enhance public safety.

“Huge events such as the annual Coachella Music and Arts Festival, the upcoming Los Angeles Olympics, World Cup Soccer Tournament, Rose Bowl, Disneyland and scores of popular tourist attractions should have access to the best available security-including the use of body cameras and facial recognition technology,” the Riverside Sheriffs’ Association argued in a bill analysis.

“By banning this technology, California will be announcing to the nation and world that it doesn’t want our law enforcement officers to have the necessary tools they need to properly protect the public and attendees of these events.”

Ting’s hometown of San Francisco became the first major city in the nation to ban facial recognition in police body cameras when it passed an ordinance in May. Oakland followed suit in July. The statewide bill faces final votes on the Senate and Assembly floors this week.