JERSEY CITY — Detective Joseph Seals, the first victim in Jersey City’s mass shooting Tuesday, was meeting a confidential informant at Bayview Cemetery, right before he encountered a stolen U-Haul van.

A senior law enforcement source told PIX11 News Friday investigators have solved the mystery of why Seals, 39, was in the cemetery that day.

They’ve learned he was meeting an informant connected to one of his gun or narcotics cases.

The meeting was not tied to shooting suspects David Anderson and Francine Graham, who apparently ambushed the detective when he approached the van.

Detective Seals, a father of five and 15-year veteran of the Jersey City Police Department, was killed with a gunshot to the head.

The suspects, who had posted anti-Semitic statements on Facebook, then proceeded to the Jersey City Kosher Market on Martin Luther King Drive, several blocks away, and exited the van firing an AR-15 rifle and 12 gauge shotgun.

The law enforcement source said David Anderson “may have been emotionally disturbed, but he was doing this out of hate.”

Regarding the Yeshiva and pre-K situated above the market, the source said, “I think given the opportunity, they would have shot into that school.”

The source emphasized once again how crucial the actions of two Jersey City cops were in preventing more deaths.

The market’s co-owner, an employee, and a 24-year old customer were killed inside.

Anderson and Graham died in the sustained gun battle that followed.

PIX11 News also learned Friday that the case has essentially evolved into two, separate investigations: with the Attorney General’s office handling the shooting investigation, while the FBI examines potential ties the dead suspects had to the Black Hebrew Israelite organization, which is considered an extremist hate group.

Also Friday, the law enforcement source told PIX11 that investigators believe the suspects killed livery cab driver, Michael Rumberger, in Bayonne last Saturday after robbing him of $80.

Rumberger, who actually lived in Jersey City, was found dead in the trunk of his car.

