New York City has agreed to pay up to $75 million to settle a federal class-action lawsuit that accused police officers of writing at least 900,000 summonses for offenses like trespassing, disorderly conduct and urinating in public that were later dismissed because of legal insufficiency.

The lawsuit was filed in 2010 by seven men and two women who said they were wrongly slapped with summonses, and it came amid a growing outcry over the NYPD’s encounters with minorities. The lead plaintiff in the case, Sharif Stinson, said he was stopped twice outside his aunt’s Bronx building in 2010 when he was 19 and was given disorderly conduct summonses by officers who said he used obscene language. But the officers didn’t specify what the language or behavior was, and the tickets were dismissed.

Lawyers for the plaintiffs called it the largest false-arrest class-action lawsuit in city history. The settlement nearly doubled the $41 million deal the city made with the five men who were wrongly convicted in the vicious 1989 rape and beating of a Central Park jogger.

The 2010 lawsuit includes summonses filed from 2007 through at least 2015, and the number tossed for legal insufficiency is about one quarter of all the summonses filed during that time, according to data in the lawsuit. Legal insufficiency is not necessarily a lack of evidence — it may be that an officer didn’t clearly explain why someone was ticketed.

According to the settlement terms, those eligible for compensation would receive a maximum $150 per person per incident. A total of $56.6 million would be set aside, and individual payments could end up lower if more claims are made. Any funds not paid go back to the city, which is also paying $18.5 million in legal fees. Possible class members would be notified through social media and other advertisements.

advertisement | advertise on newsday

The lawsuit argued that police were routinely ordered to issue summonses “regardless of whether any crime or violation” had occurred in order to meet quotas. It cited claims by two whistleblower officers who said they were forced into quotas by precinct superiors. The quota allegations were explicitly denied in the settlement agreement filed Monday.

Under the agreement, the city said the NYPD was updating and expanding training and guidance reiterating to officers and their superiors that quotas were not allowed, and officers must not be mandated to make a particular number of summonses, street stops or arrests.

The settlement must be approved by U.S. District Judge Robert W. Sweet.