The NYPD has agreed to update some of its policies and training as part of a settlement with the Legal Aid Society and two private law firms that was finalized on Friday.

In a 2019 class-action lawsuit, several New Yorkers accused police of detaining people for long periods of time to check their records during pedestrian and car stops. People would be left waiting while officers checked to see if they were named in any open warrants or investigations, even if they hadn’t found any evidence of a crime during a search.

Terron Belle, the case’s lead plaintiff and one of seven named plaintiffs in the lawsuit, said four officers surrounded him when he was walking home from the subway one night in 2017 and searched him for a gun. But after the officers didn’t find anything, Belle said, they still demanded his ID and detained him while they ran a warrant check. The Legal Aid Society argues that practice unconstitutionally violates people’s Fourth Amendment rights.

While the NYPD did not admit to wrongdoing, it did change its patrol guide to give officers clearer instructions for warrant and investigation checks during stops. The policies now instruct officers that they cannot detain a person while searching for a warrant or open investigation against them unless they have reasonable suspicion to believe the person has committed or is about to commit a crime. Once they no longer have reason to think that someone is breaking the law — for instance, if they search someone for drugs and find nothing on them — police are not allowed to detain them any longer.

The department is retraining sergeants and officers on the new policies and has sent a memo to personnel notifying them of the update. Violating the rules could result in discipline, according to the agreement.

“I brought this lawsuit to challenge the NYPD’s violation of my rights and the rights of other Black and Latinx people all over the city,” Belle said in a press release. “I am hopeful that the settlement reached will keep what happened to me from happening to other people. I was treated like a criminal and held against my will so that they could run a warrant check on me when I had done nothing wrong.”

The city has agreed to pay more than $450,000 in damages and attorneys’ fees. In a statement, the city’s Law Department said the agreement was a response to the plaintiffs’ complaints and “does not indicate a broad issue.”

“The NYPD is committed to upholding the constitutional rights of individuals, and has agreed to clarify its existing policy to make it clear when officers can run a warrant query during a detainment,” the department said.

The NYPD’s stop and search practices have been scrutinized for years, including accusations of overpolicing in certain neighborhoods and complaints of officers harassing people who had not committed any crimes. Another lawsuit settled in 2013, Floyd v. City of New York, required the department to agree to sweeping reforms to its stop, question and frisk policies. That case exposed racial disparities and constitutional violations that led the city to bring in a federal monitor to supervise the department’s use of stop and frisk. The monitor is still in place, nearly a decade later.

The plaintiffs in this case called officers’ warrant-searching practices a new form of stop and frisk that subjected people to unnecessary searches in order to boost arrest numbers.

“In a free country, you shouldn’t have to give officers your ID for them to run a warrant check just because you’re standing on the sidewalk,” said Edison Quito, one of the plaintiffs in the suit. “I joined the case to try to challenge the NYPD’s illegal practice and I am proud of the result.”