After years of criticism, Facebook announced Tuesday that it would drastically scale back its facial recognition system and delete more than 1 billion users’ facial templates.

The news comes after a federal judge in Illinois approved a settlement of a class action lawsuit in which Facebook agreed to pay $650 million for allegedly using users’ face-tagging and other biometric data without their permission.

For years, privacy advocates and lawyers have questioned Facebook’s practice of scanning photos for any recognizable faces, accusing the company of misrepresenting the system to Facebook users.

According to a statement from Facebook’s vice president of artificial intelligence, Jerome Pesenti, the company will continue to use facial recognition technology for a “limited set of use cases.” He stated that these services would include assisting people in gaining access to a locked account, verifying their identity in financial products, and unlocking a personal device.

However, the company said it had re-evaluated whether the system was worth the trouble and costs in other situations, such as photos on social media.

“We need to balance the positive use cases for facial recognition against growing societal concerns,” Pesenti said, noting that regulators have yet to issue clear rules.

“People who have opted in to our Face Recognition setting will no longer be automatically recognized in photos and videos, and we will delete the facial recognition template that was used to identify them,” he explained.

He claimed that more than a third of Facebook’s daily active users had enabled facial recognition and could be identified. He also stated that some people place a high value on the system, which includes a feature that generates image descriptions for the blind and visually impaired.

However, he claimed that there was too much ambiguity in terms of regulation and privacy concerns.

“In light of this ongoing uncertainty,” he said, “we believe that limiting the use of facial recognition to a limited set of use cases is appropriate.”