NEW YORK (AP) — A federal judge has ruled that the New York Police Department's surveillance of Muslims in New Jersey was a lawful effort to prevent terrorism, not a civil rights violation.

U.S. District Judge William Martini dismissed a lawsuit brought in 2012 by eight Muslims who said the surveillance programs were unconstitutional because they focused on religion, national origin and race. His ruling was issued Thursday in Newark.

The lawsuit accused the NYPD of spying on ordinary people at mosques, restaurants and schools in New Jersey since 2002.

Martini said he was not convinced that the plaintiffs were targeted solely because of their religion. He said the more likely explanation for the surveillance was "to locate budding terrorist conspiracies."

Plaintiff Farhaj Hassan says the ruling felt "a slap in the face."

More From Talk Radio 960 AM