The city’s law department on Monday agreed to pay $75 million in a class-action lawsuit settlement after the NYPD was accused of issuing summonses without probable cause in order to meet quotas.

The suit, first filed in 2010, alleged that police would stop and arrest people regardless of whether a crime or violation was committed.

According to court papers, 899,719 summonses were dismissed on the grounds of being factually insufficient from May 2007 to December 2015.

“This settlement reflects the remarkable progress the NYPD has made to ensure that summonses are properly drafted and include sufficient details to document probable cause,” law department corporation counsel Zachary W. Carter said in a statement. “This agreement is a fair resolution for class members and brings an end to a long-standing and complex case in the best interests of the city.”

The city will set aside $56.5 million to pay a maximum of $150 per person covered by the deal per incident, the law department said. Another $18.5 million would go toward paying attorneys’ fees.

A law department spokesman said the court still has to approve the settlement following a fairness hearing, expected to take place in about three months.

“We have achieved a landmark settlement in a civil rights case that advances the cause of justice,” said Elinor Sutton, a lawyer for the plaintiffs with the law firm Quinn Emanuel Urquart & Sullivan.

The law department spokesman said the NYPD has since updated its training, and will reiterate to officers and other ranks that the department will not use quotas.

The settlement comes after Mayor Bill de Blasio signed the Criminal Justice Reform Act in June, a series of eight bills which defer many nonviolent offenses to an administrative court, rather than having them wind up in criminal court.

Under the law, police still have the option to make an arrest or issue a criminal summons.

-With Reuters