The New York City Police Department has agreed to develop new policies and training materials for its Intelligence Bureau with input from Muslims and pay out more than $1 million in damages and legal fees to settle a lawsuit over its surveillance of Muslims in the decade following the 9/11 terrorist attacks.

The case, Hassan v. City of New York, filed six years ago, was the first of three federal lawsuits spurred by the Associated Press’s Pulitzer Prize-winning reporting in 2011 that exposed the NYPD’s secret mapping and monitoring of Muslim communities — including mosques, schools, restaurants and bookstores in and around New York City — on the basis of ethnicity and religion, and often in the absence of any meaningful suspicion.

A federal judge in 2016 approved a settlement for the other two lawsuits, in which the NYPD agreed to actively prohibit investigations on the basis of race, ethnicity, religion or national origin, and to allow a civilian representative to monitor its compliance.

Attorneys and plaintiffs involved in the latest settlement said Thursday that the agreement builds on previous ones by ensuring public and plaintiffs’ input into the Intelligence Bureau’s policies and training materials, extending the guidelines established by the previous settlement to cover the residents of New Jersey and awarding monetary damages to some of those targeted by the surveillance program.

“Today’s settlement sends a message to all law enforcement agencies loud and clear,” said Farhana Khera, executive director of Muslim Advocates, the organization that filed suit on behalf of 10 New Jersey Muslim individuals and organizations that the NYPD monitored under its secret program. “Simply being Muslim is not a basis for suspicion and cannot be a basis for surveillance.” Khera said.

Khera said police spied on nearly 40 mosques, businesses, schools and student associations in New Jersey alone.

New York City Police Commissioner James P. O’Neill stressed in a statement Thursday that New York City and the NYPD have not admitted to any violation of law or misconduct.

“The resolution of this case affirms and enhances the NYPD’s commitment to conducting effective investigations to prevent crime and terrorism,” O’Neill said.

The police force said the settlement demonstrates the NYPD’s continuing commitment to “safeguard individual constitutional rights” while keeping the city safe.

The individual damages are modest, ranging from $2,500 for the married couple who ran a predominantly black girls’ school that the police surveilled — recording notes on the girls as they walked into school in the morning — to $22,500 for the Council of Imams in New Jersey, an association of more than a dozen historically black mosques, some of which also were surveilled.

The plaintiffs also include a butcher shop, which will receive $15,000 in damages; an auto body shop, which will receive $10,000; and local university chapters of the Muslim Students Association, which will receive $5,000.

“My co-plaintiffs and I felt enough is enough. Someone had to take a stand,” lead plaintiff Farhaj Hassan, a sergeant in the U.S. Army Reserve, said in a conference call with reporters Thursday, and the plaintiffs, he said, had “won.”

“A police department not acknowledging wrongdoing is akin to a congressman’s ‘no comment,’ ” he added. “We know they did it. They’re just not going to admit it.” But the police documents and terms of the settlement have made clear the abuses that occurred, he said.

Attorneys and plaintiffs hailed the settlement — and a previous decision by the 3rd Circuit Court of Appeals to uphold the lawsuit after the NYPD sought to have the case dismissed — as critically important in a period of what they described as continued public and administration-sanctioned hostility toward Muslims.

Muslim Advocates’ Khera said she hoped that the case would serve as “a reminder to other courts” that are reviewing more recent actions by the Trump administration including the president’s widely dubbed “Muslim ban,” which will be considered by the Supreme Court at the end of the month.

“I’m hopeful there are lessons to be learned from this,” said W. Deen Shareef, convener of the Council of Imams in New Jersey and a plaintiff in the case. “Whenever there is a mistake that is made, we always hope that people can acknowledge the mistake that they made . . . and we hope that they can find a way of improving so the mistake will not be made again.”