A 74-year-old grandmother who was fatally shot in Camden last month was the unintended target of a gunman who meant to shoot her grandson, a prosecutor told a judge Wednesday.

Sheila Baskin was sitting in the front passenger seat of her car on the 1800 block of Mulford Street about 10 a.m. and was on her way to get groceries when seven gunshots rang out, Assistant Prosecutor Peter Gallagher said. She was pronounced dead at Cooper University Hospital from a gunshot wound to her shoulder.

The alleged gunman, Dayshawn Nesmith, 23, of Camden, had approached the car when Baskin’s grandson was helping her get situated, the prosecutor said during a virtual detention hearing for Nesmith, who has been charged with first-degree murder and gun offenses.

“It’s a 74-year-old woman going to get her groceries on a Sunday morning. You seem to be saying it’s almost an execution,” Superior Court Judge Thomas Shusted Jr. said before ordering Nesmith detained pending trial.

“Except he executed the wrong target,” Gallagher said, adding that Nesmith had meant to shoot the woman’s grandson, who he believed had provided information to law enforcement officials. He did not elaborate.

After the shooting, the grandson identified Nesmith as the shooter and told detectives he had had a confrontation with him days earlier.

Surveillance footage on the block captured the shooting, authorities said. The suspect, who was wearing a light-colored covering on his head, was seen running away afterward.

The prosecutor told the judge that video footage also showed a minivan driven by Nesmith in the area of the homicide that day, and said his cell phone records corroborate his whereabouts. Further, a gray sweatshirt with teal stripes found at a house he was seen going into and out of that day contained gunshot residue and matched what the shooter was wearing, the prosecutor said.

Defense attorney Brad Wertheimer said Nesmith, a lifelong Camden County resident with three children, “denies any knowledge of the shooting." He also pointed out that no weapon was found.

Nesmith is in custody at the Camden County Correctional Facility.