CNN  — 

Hundreds flooded the streets Wednesday night to mourn two of the victims killed after two assailants opened fire at a kosher market in Jersey City.

In Jersey City, crowds of men in black hats surrounded the casket of Mindy Ferencz in the Jersey City neighborhood of Greenville at the site of a synagogue under construction. Hundreds of women, separated from the men as per Orthodox Jewish tradition, were standing in the bitter cold sobbing.

Meanwhile, hundreds of people gathered outside the Satmar Shul orthodox synagogue in Brooklyn to mourn 24-year-old Moshe Deutsch.

Orthodox Jewish men carry the casket of one of the victims of Tuesday's shootings in Jersey City.

As the funeral for Ferencz and Deutsch took place, investigators were still trying to determine what motivated the pair of shooters, who were also killed, to carry out Tuesday’s attack.

One of the assailants of the deadly attack in Jersey City market has been linked to the Black Hebrew Israelites movement, The New York Times reported Wednesday.

The shooter, David N. Anderson, appears to have a connection to the movement but the extent of his involvement in that group is unclear, a law enforcement official told the newspaper.

The Black Hebrew Israelite movement is best known for its confrontational brand of street preaching in urban areas but it has a complex history in the United States, with sects and branches splintering over theological and leadership disputes. Scholars say what unites most Black Israelites is the belief that African Americans are the true descendants of biblical Jews.

Some members have expressed anti-Semitic sentiments in the past.

David N. Anderson

Anderson, 47, and Francine Graham, 50, went on a shooting spree and had an hours-long gunbattle with police Tuesday that left four people dead – three people in the market and a police officer, New Jersey Attorney General Gurbir Grewal said.

Earlier Wednesday, authorities did not discuss the pair’s background and said only they are the “prime suspects” in the killing of an Uber driver in Bayonne, New Jersey, Grewal said.

Francine Graham

Authorities were checking into a note found in a stolen U-Haul truck used by the shooters Tuesday that contained both anti-Semitic and anti-police writing, a law enforcement source told CNN.

Posts with similar sentiments also have been found on social media linked to the shooters, the source said.

Law enforcement officers found a operable pipe bomb in the back of the U-Haul, Newark FBI Special Agent in Charge Gregory W. Ehrie said.

“It’s down at the FBI laboratory right now. It was a viable device, meaning it could be a device that would have exploded,” Ehrie told reporters Wednesday.

How the attack unfolded

The Tuesday afternoon store attack led to chaotic scenes over several hours in the city across the Hudson River from Manhattan, with heavily armed officers taking over city streets, pulling up in armored personnel vehicles amid the sounds of sirens and gunshots.

Authorities believe the shooters first killed Jersey City police Detective Joseph Seals at a cemetery, and then drove to the Jersey City Kosher Supermarket, kicking off the gun attack and police shootout, Grewal said.

• Around 12:21 p.m., Anderson parked a U-Haul truck directly across the street from the supermarket, about a mile from the cemetery. He exited with a rifle and began shooting at the market while Graham followed him inside.

• Around 12:38 p.m., a bystander called 911 to report Seals’ body in the cemetery.

• Around 12:43 p.m., police arrived near the supermarket “and engaged with the two suspects inside,” starting a long shootout.

• Around 3:25 p.m., a police armored vehicle broke into the supermarket’s entryway.

• Around 3:47 p.m., law enforcement found Anderson and Graham’s bodies inside the supermarket.

Earlier Wednesday, Jersey City Department of Public Safety Director James Shea told reporters that authorities learned the incident began as an attack on civilians in the store and progressed into a gunbattle with officers after reviewing surveillance video.

Authorities had been unclear in the immediate aftermath of the attack about how the shootings and the gunfire exchange unfolded.

A survivor escaped after being shot

A person who was inside the market was shot when Anderson and Graham opened fire but was able to flee early on.

“The survivor was able to escape the store at the beginning of the incident and we are not providing his name at this time,” Grewal said Wednesday.

Ferencz, 31 and Deutsch were among the three people who were killed in Tuesday’s attack.

Ferencz, the wife of the store owner, was killed almost immediately after the two suspects entered. Deutsch, a customer at the store, and a store worker – Douglas Miguel Rodriguez, 49 – were also killed in the shooting, Grewal said.

Deutsch and Ferencz both had ties to the Jewish community in the Williamsburg neighborhood of Brooklyn, New York Mayor Bill de Blasio said.

Some officials say the attack was a hate crime

While New Jersey investigators say they don’t yet know why the shooters attacked the store, some officials there and in neighboring New York City have said they think the attack was a hate crime.

“My sentiment is that it should be viewed as a hate crime,” Jersey City Mayor Steven Fulop told reporters Wednesday afternoon. “There’s no question it was an attack on the Jewish community.”

De Blasio said he agreed with Fulop.

“What we saw yesterday was a premeditated, violent anti-Semitic hate crime,” de Blasio told reporters in his city Wednesday.

“In other words, you can say it was an act of terror because it was premeditated, it was violent, and it was directed at the Jewish community,” the mayor said.

Police responded to reports of shots fired Tuesday in Jersey City.

Officials in both states say they’re reaching out to the Jewish community. Fulop said officials would be meeting Wednesday with community leaders.

In New York City, hundreds of police officers will monitor dozens of Jewish locations “for a number of days to come,” de Blasio said.

New York state police have increased patrols near synagogues and Jewish establishments, Gov. Andrew Cuomo said.

Police officers rush to the scene of an active shooting in Jersey City, New Jersey, on Tuesday.

What the video shows, according to officials

Authorities’ latest account of the shootout conflicts with what they said a day earlier. Tuesday, officials initially said the gunfire spanned multiple locations, and CNN affiliates reported the shooting began at a cemetery.

Wednesday, Fulop tried to clarify the timeline.

Police have said the shooting began around 12:30 p.m. Tuesday.

Surveillance video shows a van moving slowly through the city’s streets before stopping in front of the store, Fulop said.

“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,” Fulop said.

“There were many other (potential) targets available to them that they bypassed to attack that place,” said Shea, the Jersey City public safety director.

A police officer, three civilians and the two suspects were killed in the shooting, authorities said.

Officers saved lives, officials say

Chaotic scenes ensued when the shooting began. Commerce in the area virtually shut down and schools went on lockdown.

Two police officers happened to be nearby and rushed there immediately. They transmitted information to colleagues and were shot, but they likely saved lives, Shea said.

“Within seconds, more Jersey City police officers responded to their calls, pulled them out of the line of fire and continue to engage the two people carrying guns inside the store,” Shea said.

“Had (the two officers) not been there in that location, more than likely more people would have died,” Fulop said.

City shudders

Grewal, the New Jersey attorney general, said he and his staff are mourning with the city.

“We recognize the fear that communities rightfully feel after traumatic incidents such as these, and we are committed to providing all resources necessary to ensure the safety and well-being of our fellow residents,” Grewal said.

Jersey City Public Schools delayed the start of classes Wednesday in the wake of the shooting.

Tuesday evening, New Jersey Gov. Phil Murphy praised the efforts of law enforcement, who “responded to this incident not knowing what they were entering, or if they would even make it out.”

“If not for them,” Murphy said, “I shudder, we shudder to think about how much worse today could have been.”

The New Jersey State Policemen’s Benevolent Association tweeted: “We need a lot of prayers right now for Jersey City officers. Keep all those involved in your thoughts.”

Correction: An earlier version of this story gave an incorrect name provided by officials for one of the victims. He was Douglas Miguel Rodriguez.

CNN’s Ray Sanchez, Madeline Holcombe, Daniel Burke, Brynn Gingras, Julian Cummings, Joe Sutton, Rob Frehse and Dakin Andone contributed to this report.