THE BOSTON CITY COUNCIL voted unanimously on Wednesday to prohibit the police department and other city agencies from using facial recognition technology or information derived from face surveillance systems.

The ordinance also prohibits law enforcement and city employees from obtaining facial surveillance by asking for it through a third party.

Boston now joins five other Massachusetts communities—Springfield, Cambridge, Northampton, Brookline, and Somerville—which passed bans over the past year. Boston is the second-largest city in the country to ban the use of the technology, behind San Francisco.

It is widely anticipated that Mayor Martin Walsh will sign the ban, although he has not spoken publicly in favor or against it.

Police officials have previously said facial recognition isn’t used by the department. Although the technology could be available through a software upgrade, the department has said it has not signed up for the upgrade.

At-Large Councilor Michelle Wu sponsored the bill with District 5 Councilor Ricardo Arroyo. Wu said that the city should “not use racially discriminatory technology that threatens the privacy and basic rights of our residents.”

Arroyo noted that such surveillance is a “particularly serious threat to black and brown people.” He added: “Especially now, as communities are demanding real change from their elected officials, we need to proactively ensure that we do not invest in technology that studies show is ineffective and furthers systemic racism.”

A 2018 MIT study cited by Arroyo indicated that commercial facial analysis programs show a high error rate with dark-skinned women.

During a hearing on the ordinance earlier this month, Boston Police Commissioner William Gross said the technology is unreliable and isn’t used by the department. “Until this technology is 100 percent, I’m not interested in it,” he said, noting that as an African-American, he, too, could be “misidentified.”

The Boston Police Department does send pictures of suspects to the Registry of Motor Vehicles, which uses its database of driver’s licenses and state IDs to look for a match. That will no longer be allowed under the council’s ban.

“The BPD has been using that system for some years now. It will be prohibited under this ordinance,” said Kade Crockford, director of the technology for liberty program at the ACLU of Massachusetts.

During the council meeting Wednesday, District Councilor Frank Baker asked if the ban would have affected the search for the Boston Marathon bombers, which relied on images acquired through video surveillance.

“We’re not stopping video surveillance, just the technology that can zero in on a face,” said Councilor Lydia Edwards.

The issue of the ineptitude of facial recognition software gained nationwide attention when a black man, Robert Julian-Borchak Williams, was arrested based on a still image from surveillance video, which improperly identified him as a shoplifter.

“This is not me,” Williams told investigators when they showed him the image. “You think all black men look alike?”

Williams spent 30 hours in a prison cell before being released on $1,000 bond. The case was dismissed, and the Wayne County prosecutor’s office in Detroit said Williams will have the charges against him and his fingerprint data expunged.

The American Civil Liberties Union of Massachusetts hopes the Legislature will also consider a bill filed by state Sen. Cindy Creem and state Rep. David Rogers, which would impose a statewide moratorium on government use of facial recognition.

“Everyone who lives in Massachusetts deserves these protections; it’s time for the Massachusetts legislature to press pause on this technology by passing a statewide moratorium on government use of face surveillance,” said Carol Rose, executive director of the American Civil Liberties Union of Massachusetts.