A suspect involved in a prolonged firefight in Jersey City, N.J., that left six people dead, including one police officer, had published anti-Semitic and anti-police posts online and investigators believe the attack was motivated by those sentiments, a law enforcement official familiar with the case said on Wednesday.

The Jersey City mayor said surveillance footage indicated that the two shooters had targeted a kosher supermarket where most of the carnage unfolded.

On Twitter Wednesday, Mayor Steven Fulop wrote that an “extensive review” of the city’s closed-circuit cameras made it clear “that these two individuals targeted the kosher grocery location” where they opened fire and sparked a gun battle with police officers.