New Jersey police officers are now barred from using a facial recognition app made by a start-up that has licensed its groundbreaking technology to hundreds of law enforcement agencies around the country.

Gurbir S. Grewal, New Jersey’s attorney general, told state prosecutors in all 21 counties on Friday that police officers should stop using the Clearview AI app.

The New York Times reported last week that Clearview had amassed a database of more than three billion photos across the web — including sites like Facebook, YouTube, Twitter and Venmo. The vast database powers an app that can match people to their online photos and link back to the sites the images came from.

“Until this week, I had not heard of Clearview AI,” Mr. Grewal said in an interview. “I was troubled. The reporting raised questions about data privacy, about cybersecurity, about law enforcement security, about the integrity of our investigations.”