The New York City Police Department has entered into a settlement agreement with members of New Jersey's Muslim community, ending a civil rights lawsuit spurred by the department's surveillance of mosques, community groups, and even schools in the wake of the September 11, 2001, terrorist attacks.

“Today is truly a good day for the civil rights of all Americans,” Farhana Khera, executive director of Muslim Advocates, said during a call with reporters Thursday. The group is co-counsel in the suit, Hassan v. City of New York, 12-cv-03401.

The settlement, filed with U.S. District Court for the District of New Jersey, represents the latest legal win over the surveillance practices initiated during former Mayor Michael Bloomberg's tenure. Another recent civil rights victory in New York, 2017's Raza v. City of New York, helped further address the police department's practices towards religious communities. The Raza plaintiffs, alongside counsel for the plaintiffs in the landmark Handschu v. Special Services Division suit, pushed the department to update the so-called “Handschu” guidelines, which codified rules regarding the department's surveillance of political, social and religious communities and activities.

According to Baher Azmy, legal director for co-counsel the Center for Constitutional Rights, the settlement Thursday provides for another broadening of the Handschu guidelines.

In the latest version of the guidelines, the NYPD is barred from launching investigations if race, religion, ethnicity, or national origin is a substantial or motivating factor, among other restrictions. The settlement announced Thursday will extend those protection across the Hudson River to communities in New Jersey.

The department affirmed that it had disbanded its demographics units that were tasked with the surveillance programs. The department's intelligence bureau will revise its training around the Handschu guidelines, and the Hassan plaintiffs will get a chance to review the planned policy guide and provide feedback on it to the department. The department has also agreed to pay $75,000 in damages to individuals and organizations affected by the surveillance, according to the NYPD.

The Hassan suit, first filed in 2012, was born out of revelations about the scope of the NYPD's surveillance programs after the publication of a series by The Associated Press. The reporting, which was later confirmed by the department's own internal documents, showed that, despite monitoring through video surveillance, community mapping, and even infiltration of nearly two dozen mosques, as well as restaurants, stores, schools and student groups associated with members of the Muslim community, the years of surveillance failed to produce a single lead.

Farhaj Hassan, the named plaintiff in the suit, said his decision was born largely out of his service as a member of the armed services. Upholding his vow to protect and defend the U.S. Constitution meant taking on even the NYPD when he felt they violated civil rights.

“Muslims are as American as anyone else. We have no other home; this is our home,” he said.

Despite the slow-turning wheels of justice, he said the effort was worth it.

“We won this case because our side was in the right—for a better America, for a better tomorrow,” he said.

Despite Thursday's results, the suit faced an uncertain end when U.S. District Judge William Martini granted the NYPD's motion to dismiss in 2014. On appeal, Khera noted that the oral arguments took place just after the terrorist attack against the magazine Charlie Hebdo in 2015. At the hearing, counsel was asked why, given the attack, the NYPD shouldn't be given wide berth to surveil.

Whatever concerns the panel in the U.S. Court of Appeals for the Third Circuit had, it was not evident in the October 2015 decision vacating Martini's dismissal. The stinging rebuke, as Khera called it, over the NYPD's practices included comparisons of the surveillance practices to Japanese internment camps during World War II and the persecution of Jewish intellectuals at the height of the Cold War red scare.

The appellate court's decision quickly led to the beginning of settlement talks between the parties.

In a statement, the NYPD noted that it did not admit to any wrongdoing or violations of the law.

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

During the conference call, the plaintiffs downplayed the department's refusal to admit wrongdoing, noting that it is a common feature of settlements.

Hassan said it was “akin to pleading the Fifth.”

“You know they did it. they're just not going to admit it,” he said.

As part of the agreement, a public meeting is scheduled to take place between either the police commissioner or a high-ranking official with the department's intelligence bureau, and members of the community in New Jersey to hear their ongoing concerns.