A controversial facial recognition system that was used to identify a demonstrator who attended last summer’s Lafayette Square protest will be halted by July, officials said Monday.

The National Capital Region Facial Recognition Investigative Leads System (NCRFRILS) is ending after a review prompted by a new Virginia law that tightens restrictions on the use of facial recognition technology by local law enforcement agencies in the state. The law takes effect July 1.

The system is a pilot program of the Metropolitan Washington Council of Governments (COG) and was used by more than a dozen law enforcement agencies across D.C., Maryland and Virginia since it was approved in 2017.

As of late last year, the system had been searched more than 12,000 times and contained a data­base of 1.4 million mug shots taken by police departments during arrests across the region.

“This program won’t continue,” Steve Kania, a COG spokesman, wrote in an email. “It depended on regional participation and financial support.”

Law enforcement officials said NCRFRILS provided valuable leads that helped crack bank robberies, identify suicidal subjects and uncover other clues in cases that might have otherwise gone unsolved. But a group of civil rights, legal and immigrant groups recently called for an end to the program.

The groups cited research showing that facial recognition technology often misidentifies women and minorities at higher rates. They also noted that ­NCRFRILS was developed with only limited public input or notice.

A number of lawyers, public defenders and facial recognition experts said they were unaware that NCRFRILS was operating until The Washington Post reported in November that the system was disclosed in court documents in the federal case against a Lafayette Square protester accused of assaulting law enforcement officers.

The case against Michael Joseph Peterson Jr. is continuing in federal court in D.C. The Lafayette Square protest on June 1 generated a national firestorm after law enforcement officials forcefully cleared protesters from the area ahead of a photo op by President Donald Trump at a nearby church.

Kania said NCRFRILS was never publicly announced because it was a pilot project. Two COG committees approved the project, but they do not hold public meetings. At least one grant for the project did go before the Fairfax County Board of Supervisors, but it generated little notice.

Jeramie D. Scott, senior counsel for the Electronic Privacy Information Center, said in a statement that COG made the right decision to end NCRFRILS. The center organized the coalition opposed to the technology.

“The program should have never seen the light of day,” Scott said. “Hopefully the council steers clear of implementing surveillance programs from now on, but I hope any future consideration of a new surveillance program involves the public in the decision-making process.”

Earlier this year, Virginia enacted one of the nation’s strictest controls on facial recognition software.

The law requires local law enforcement agencies to get approval from the state legislature before using any facial recognition system. The bill introduced by Del. Lashrecse D. Aird (D-Petersburg) was a response to the reported use by law enforcement officials in Norfolk and elsewhere of another controversial facial recognition system, Clearview AI.