NYPD Surveillance
A New York University student attends a town hall to discuss the NYPD's surveillance of Muslim communities on Feb. 29, 2012, in New York City. A federal appeals court reinstated a lawsuit Tuesday over the NYPD's surveillance program. Mario Tama/Getty Images

A Philadelphia court reinstated a civil rights lawsuit Tuesday charging the New York City police department with violating fundamental rights by infiltrating and targeting Muslim communities, the Associated Press reported. City officials defended the covert program as necessary to protect public safety after the program was revealed by AP reports in 2011 and 2012.

“We have been down similar roads before,” the 3rd U.S. Circuit Court of Appeals said, according to Newsday. “Jewish-Americans during the Red Scare, African-Americans during the Civil Rights Movement and Japanese-Americans during World War II are examples that readily spring to mind.”

The court’s ruling held that the police department’s claims of national security and public safety following the Sept. 11, 2001, attacks did not justify the use of discriminatory scrutiny in the surveillance of New Jersey communities. There were sufficient grounds for the plaintiff’s claims of violations of their religious freedom and equal protection rights.

“I'm very happy we will get our day in court,” said plaintiff Farhaj Hassan. “Muslim-Americans were the innocent community in this matter, and lo and behold, their civil rights should be protected like everyone else. It's good to see the court realized this.”

Tuesday’s ruling overturned a dismissal of the case last year that had said the police could not monitor “Muslim terrorist activities without monitoring the Muslim community itself,” the AP reported. The ruling blamed the AP for revealing the surveillance program in New York and neighboring states in a series of stories.

"What you don't know can't hurt you. And, if you do know, don't shoot us. Shoot the messenger," the court said, referencing the lower court’s reasoning about the AP’s reports.

The police program had officers infiltrate Muslim communities including student groups and mosques. New York City officials, including former Mayor Michael Bloomberg, claimed the program helped stop terrorist attacks. The unit that was involved in the program was disbanded last year.

The AP won a Pulitzer Prize, the highest award in journalism, for its reporting on the program.