NEW YORK — A settlement was announced Thursday ending a lawsuit against the New York Police Department over surveillance of Muslims in New Jersey.

NYPD agreed to not engage in surveillance based on religion or ethnicity.

The city has paid out damages of $47,500 to businesses that lost income because of the surveillance and $25,000 to individuals for the "stigma and humiliation" it brought.

The city will allow input by plaintiffs in the case to a first-ever Policy Guide

Officials will attend a public meeting with plaintiffs so they can express their concerns about the issues in the lawsuit directly to the NYPD commissioner or a senior ranking official

In a statement, the NYPD said the force does not admit to any wrongdoing.

"Simply being Muslim is not the basis for suspicion," Farhana Khera, Muslim Advocates executive director, said at a news conference.

“We are proud that we stood up to the most powerful police force in the country and against the suspicion and ignorance that guided their discriminatory practices," said Farhaj Hassan, lead plaintiff in the case. "We believe the legal rulings and settlement in this case will endure as part of a broader effort to hold this country to account for its stated commitment and its obligation to uphold religious liberty and equality."

Center for Constitutional Rights legal director Baher Azmy said that the agreement ensures the NYPD will act legally as an increasingly empowered Muslim community asserts its rights.

The NYPD began surveillance of at least 20 mosques, 14 restaurants, 11 retail stores, two grade schools, and two Muslim Student Associations in New Jersey in 2002, the year after the 9/11 terrorist attacks. The surveillance ended 2012 when the program was uncovered. The program never produced a single lead, according to Muslim Advocates.

Jim Seuss, executive director of the Council on American-Islamic Relations (CAIR) 's New Jersey chapter, said the settlement "is a great victory for the Muslims of New Jersey and people of all faiths."

Seuss was concerned that the NYPD's promise is limited to New Jersey.

"The resolution of this case affirms and enhances the NYPD's commitment to conducting effective investigations to prevent crime and terrorism," Police Commissioner James P. O'Neill said in a statement. "This has occurred while also protecting the constitutional rights and freedoms that every NYPD employee takes a sworn oath to uphold."

Former Morris County prosecutor Robert Bianchi said the the settlement was a win for the NYPD and said that federal district court Judge William Martini already ruled that the surveillance was not unconstitutional. He compared it to the surveillance of the mob and other organized crime.

"Did the New York Police Department lose this case? The answer to that is no. What they did, which is very common in all civil cases, is they sat in a room [...] and they do a cost-benefit analysis and say 'let's pay a little bit of money here" and get rid of it and they actually save themselves probably hundreds of thousands of dollars in litigation costs," Bianchi said.

The suit was filed in 2012 following reports by The Associated Press that revealed how the NYPD infiltrated Muslim student groups and put informants in mosques as part of a broad effort to prevent terrorist attacks. The effort crossed state lines into New Jersey, where the department collected intelligence on ordinary people at mosques, restaurants and schools starting in 2002, the AP reported.

In 2014, Martini ruled the surveillance program was a legal way to fight terrorism, rejecting the claim it was unconstitutional because it focused on religion, national origin and race. An appeals court revived the suit in 2015 by reversing the decision. Settlement talks began in 2016.

Federal judges have approved settlements in two other suits making similar allegations by Muslim groups in New York City that the NYPD's tactic violated their civil rights.

Reporting from the Associated Press was used in this report

Contact reporter Dan Alexander at Dan.Alexander@townsquaremedia.com or via Twitter @DanAlexanderNJ