A 29-year-old man suspected in the shooting death of a 3-year-old boy in Compton surrendered earlier this week to sheriff’s homicide detectives.

Dwayne Christopher Ward surrendered about 2:30 p.m. Monday and was taken to the sheriff’s East Los Angeles Station, where he was being held without bail, officials said.

Detectives had been negotiating with the suspect’s family and his attorney to facilitate his surrender, according to the sheriff’s department.

The shooting, which was captured on surveillance video, occurred at 7:44 p.m. Jan. 20 in the 2800 block of West Alondra Boulevard in Compton, said Deputy Charles Moore of the Sheriff’s Information Bureau. The boy, Franklin Ponros, died at a hospital, the coroner’s office reported.

The surveillance video shows two men, one of them in a vehicle, appear to exchange words in a liquor store parking lot. The other man begins to get into a car driven by his girlfriend—the boy’s mother—when the suspect appears to fire shots at him. Both cars fled the scene.

The targeted man and his girlfriend subsequently discovered that the woman’s 3-year-old son, who was in the back seat of the vehicle, had suffered a gunshot wound, Moore said.

Deputies responding to the 17200 block of South Central Avenue in Carson, where the child’s mother apparently had driven in search of help, took the boy to a hospital, where he was pronounced dead, officials said.

Dozens of mourners, including the boy’s cousins and the alleged shooter’s father, gathered at the crime scene Sunday evening for a candlelight vigil, Najee Ali, director of Project Islamic Hope, said in remarks quoted by the Los Angeles Times.

“This 3-year-old child’s death struck a nerve with everyone,’’ Ali said, adding that many of the mourners were parents. “The reality is that this child could’ve been anyone’s child, who was simply in the car at the store and lost his life.’’

Sheriff’s homicide detectives, who suspect the shooting was gangelated, have asked anyone with information regarding the boy’s death to call them at (323) 890-5500.