An assailant involved in the prolonged firefight in Jersey City, N.J., that left six people dead, including one police officer, was linked on Wednesday to the Black Hebrew Israelite movement, and had published anti-Semitic posts online, a law enforcement official said.

The violent rampage on Tuesday took place largely at a kosher supermarket where three bystanders were killed. The authorities now believe that the store was specifically targeted by the assailants, whom they identified as David N. Anderson, 47, and Francine Graham, 50.

Mr. Anderson appeared to have a connection to the Black Hebrew Israelite movement, though the extent of his involvement in that group remains unclear, the law enforcement official said.

The Black Hebrew Israelites, which has no connection with mainstream Judaism, has been described as a hate group by the Southern Poverty Law Center, a legal advocacy group that tracks such movements.