A federal appeals court on Tuesday reinstated a lawsuit challenging the New York City Police Department's surveillance of Muslim groups in New Jersey following the September 11th terrorist attacks.

The Third Circuit Court of Appeals found the Muslim plaintiffs presented a valid claim of discrimination on the basis of religion. 

The decision reverses an earlier 2014 ruling dismissing the case. 

The previous judge said any harm done to the Muslim community was not caused by the surveillance program, but by reporting done by the Associated Press who exposed it. 

A three-judge panel rejected the previous findings, comparing the practices to blanket scrutiny of Japanese-Americans during World War II.

The NYPD says it's prepared to defend their actions.

"We will defend against it vigorously," said Larry Byrne, the NYPD's deputy commissioner for legal matters. "There's been no finding by the court that the NYPD did anything wrong or anything illegal. It's simply a procedural opportunity for the plaintiffs to see if they can prove their case. We're going to defend the case vigorously, and we expect to win on the merits."

"Our position is, we will continue to fight against that position," said Ghita Schwarz, an attorney with the Center for Constitutional Rights. "We think the court is firmly on our side. They've remanded it back to the district court for full adjudication, and we're very happy to defend our position in court."

The city Law Department released a statement, saying, "We are reviewing the decision, which sends the case back to the lower court to determine whether the plaintiffs’ allegations are true. At this stage, the issue is whether the NYPD in fact surveilled individuals and businesses solely because they are Muslim, something the NYPD has never condoned."