The two killers who stormed a kosher market in Jersey City were driven by hatred of Jews and police, New Jersey’s attorney general has said.

Attorney general Gurbir Grewal added that the case is being investigated as domestic terrorism.

He disclosed that the man and woman had five guns, including an AR-15-style rifle and a shotgun that they were wielding when they burst into the store in an attack that left the scene littered with several hundred shell casings. They also had a pipe bomb in their van.

“The outcome would have been far, far worse” if not for the Jersey City Police, Mr Grewal said. Authorities noted that a Jewish school is next to the market and a Catholic school is across the street.

The attackers killed three people in the store, in addition to a police officer at a cemetery about a mile away, before dying in an hours-long gunbattle with police on Tuesday afternoon.

Shooting Jersey City
Police officers stand near the scene of a gun fight at a kosher supermarket in Jersey City (Seth Wenig/AP)

“The evidence points toward acts of hate. I can confirm that we’re investigating this matter as potential acts of domestic terrorism fuelled both by anti-Semitism and anti-law enforcement beliefs,” the attorney general said.

He said social media posts, witness interviews and other evidence reflected the couple’s hatred of Jews and police.

Mr Grewal noted that after killing three people in the store, the couple concentrated their fire on police and did not shoot at others who happened to be on the streets.

He said the attackers, David Anderson, 47, and Francine Graham, 50, had expressed interest in a fringe religious group called the Black Hebrew Israelites, whose members often rail against Jews and whites.

But he said there was no evidence so far that they were members, and added that the two were believed to have acted alone.

Shooting Jersey City
Gurbir Grewal speaks during a news conference in Jersey City (Seth Wenig/AP)

The pair brought their cache of weapons in a U-Haul van they drove from Bay View Cemetery, where they shot and killed Jersey City Detective Joseph Seals, according to the attorney general.

Anderson fired away with the AR-15-style rifle as he entered the store, while Graham brought a 12-gauge shotgun into the shop. They also had handguns with a homemade silencer and a device to catch shell casings.

In all, they had five guns — four recovered in the store, one in the van — in what Mr Grewal called a “tremendous amount of firepower”.

Serial numbers from two of the weapons showed that Graham purchased them in Ohio in 2018, the attorney general said.

The victims killed in the store were: Mindel Ferencz, 31, who with her husband owned the grocery; 24-year-old Moshe Deutsch, a rabbinical student from Brooklyn who was shopping there; and store employee Douglas Miguel Rodriguez, 49. A fourth person in the store was shot and wounded but managed to escape, authorities said.

Shooting Jersey City
Orthodox Jewish men carry Moshe Deutsch’s coffin outside a Brooklyn synagogue (Mark Lennihan/AP)

Members of New York’s ultra-Orthodox Jewish community gathered on Wednesday night for funerals for Ms Ferencz and Mr Deutsch. Thousands of people, mostly men, followed Ms Ferencz’s coffin through the streets of Brooklyn, hugging and crying.

The bloodshed in the city of 270,000 people across the Hudson River from New York City spread fear through the Jewish community and weighed heavily on the minds of more than 300 people who attended a vigil on Wednesday night at a synagogue about a mile from where the shootings took place.

In the deadliest attack on Jews in US. history, 11 people were killed in an October 2018 shooting at a synagogue in Pittsburgh. Last April, a gunman opened fire at a synagogue near San Diego, killing a woman and wounding a rabbi and two others.