The killings at a kosher grocery in Jersey City NJ on Tuesday were a “targeted” attack and a “hate crime,” the city’s mayor said Wednesday.

One of the two killers — both shot dead by police in a gun battle after the grocery attack — was linked to the Black Hebrew Israelite movement, a known hate group.

Six people died in the attack and the subsequent battle, including three people inside the store, a police detective and the attackers, identified as David Anderson and Francine Graham. At least two other police officers were wounded.

Anderson is the one thought to be connected to the Black Hebrew Israelites; Graham’s status regarding the group is unclear.

Investigators initially believed the attack was not terrorism, but changed their minds after seeing security camera footage that showed the shooting started before police converged on the scene.

We could see the van moving through Jersey City streets slowly, the perpetrator stopped in front of there, calmly opened the door with two long rifles — him and the other perpetrator — and began firing from the street into the facility,” Mayor Steve Fulop told reporters at a Wednesday news conference.

Fulop noted that the grocery was next door to a Jewish yeshiva school, where one witness said up to 100 children were trapped by the gun battle.

The reason those perpetrators seemed to be inside that deli and not able to move potentially to the school or potentially to inflict more harm was because the police responded immediately and returned fire,” Fulop said.

The first to be killed on Tuesday was police Det. Joseph Seals, a “plain-clothes officer who was shot after approaching suspects in a graveyard about a dozen blocks from the market,” reports Politico.

The attackers then drove straight to the kosher market.

For much of at least the next hour, residents nearby — and blocks away — could hear rapid bursts of gunfire coming from the area around the market,” reports the New York Times, citing an unidentifed law enforcement official. “Investigators later found a live pipe bomb inside the van.”

A variety of groups are associated with the Black Hebrew Israelites, and their beliefs vary in detail. But generally, the Times says, followers “believe that the 12 tribes of Israel defined in the Old Testament are different ethnic groups, or nations, and that white people are not among them.”

Black Hebrew Israelites “mostly trade in anti-Semitism” and “view Jews as impostors,” Heidi Beirich of the Southern Poverty Law Center told the Times, adding that “the movement has not been known for committing mass acts of violence” in the past.