JERSEY CITY, New Jersey (WABC) -- A multi-agency investigation is underway and communities are in mourning after four people -- a police officer and three civilians -- were killed in a wild shootout and standoff that ended in a Jewish grocery store in Jersey City Tuesday afternoon.
The two suspects were also killed.
The officer was identified as Detective Joseph Seals, a husband and father of five who had been with the department since 2006, while the victims in the supermarket are 24-year-old Moshe Deutsch, 49-year-old Douglas Miguel Rodriguez. and 31-year-old Mindy Ferencz.
Chabad Rabbi Moshe Schapiro, who shops at the store and attends a synagogue next door, said he spoke with the store owner, Moishe Ferencz.
"He told me he had just walked out of the store into the synagogue not five feet away just before this happened, and then he couldn't get back for hours," Schapiro said. "His wife was inside the store. He said, 'I hope my wife is safe.'"
The suspects are identified as 47-year-old David Anderson and 50-year-old Francine Graham, per law enforcement sources, believed to be followers of the Black Israelites, a group that espouses hatred toward Jews. The group is also known for anti-government and anti-police sentiments.
According to multiple law enforcement officials, a device found in the back of the stolen U-Haul proved to be an operable explosive device, a pipe bomb. Also in the U-Haul were notes with religious writings.
The bomb squad detonated the device, though it remains unclear what the suspects had planned to do with it. Officials say it is a key component of the investigation.
Related: What we know about the suspects
The focus now is on the investigation, and with many unanswered questions, crime scene investigators were still working to piece together exactly what unfolded, as cameras got the first look inside the store where the hours-long incident ended.
Jersey City Mayor Steven Fulop said Wednesday morning that the gunmen targeted the market, with surveillance video showing them driving slowly through the city's streets before stopping outside, calmly exiting their van and immediately opening fire.
"We could see the van moving through Jersey City streets slowly," he said. "The perpetrators stopped in front of (the market), calmly opened the door with two long rifles - him and the other perpetrator - and began firing from the street into the facility."
WATCH: Jersey City mayor holds briefing on shootout investigation
New Jersey authorities are preliminarily investigating the incident as a case of domestic terrorism.
The incident began at the Bay View Cemetery, where Seals was fatally shot and another officer wounded in the shoulder.
Officials say Anderson and Graham then drove the U-Haul about a mile to the grocery store, parking across the street and exiting the vehicle with guns drawn. They immediately began firing, shooting four people inside, one of whom managed to flee from the scene.
Officers in the area quickly arrived on scene, trapping the two suspects inside. The lengthy gun battle then commenced.
The furious shooting filled the streets of Jersey City with the sounds of heavy gunfire for hours and kept the city's 30,000 students locked down in their schools until the situation was resolved.
Schools had a delayed 10 a.m. opening Wednesday.
As the suspects fired upon them from inside the grocery store, police retreated and took up defensive positions as hundreds of officers, SWAT units, and the Bureau of Alcohol, Tobacco, Firearms and Explosives, and the FBI descended on the area.
Two other officers were wounded but were later released from the hospital, authorities said. They were identified as Mariela Fernandez and Ray Sanchez
Law enforcement sources said Detective Seals may have been interested in the two suspects who ultimately killed him because of a weekend homicide in Bayonne, where a Jersey City man identified as Michael Rumberger was found in the trunk of a Lincoln Town Car on Saturday night.
That crime had not been immediately solved.