NBC Bay Area has learned that one of the three men charged with carrying out a murder with a police officer's off-duty revolver was wearing an electronic monitor issued by United States immigration officials.

Data from that monitor confirms that the 18-year-old suspect was at the murder scene at the time of the slaying.

Erick Garcia-Pineda entered a not guilty plea Thursday to a litany of charges, including allegations that he murdered 23-year-old Abel Ezquivel on the street in the San Francisco's Mission District early in the morning of Aug. 15. Two other defendants also denied the allegations, which include an allegation of murder during the commission of a robbery, which would trigger a term of life in prison without parole.

NBC Bay Area has learned that one of the three men charged with carrying out a murder with a police officer's off-duty revolver was wearing an electronic monitor issued by United States immigration officials. Sergio Quintana reports.

NBC Bay Area's Investigative Unit has learned that Garcia-Pineda is an undocumented immigrant and was wearing an ICE-issued electronic monitoring bracelet at the time of the slaying. Immigration officials did not immediately respond to NBC Bay Area's requests for comment.

It is not clear why. Sources tell NBC Bay Area Garcia-Pineda was claiming asylum in the United States -- claiming he was being hounded by MS-13 gang members.

Following the homicide, Garcia-Pineda was later arrested for unrelated battery charges in another alleged attack. That's when San Francisco Sheriff's deputies removed the electronic bracelet and kept it as evidence. The sheriff's office declined to comment about what may have occurred, other than to say that such bracelets are not always identifiable and it is standard practice to remove them as an inmate safety precaution.

Prosecutors did not file charges for the alleged battery, pending further investigation. But during the investigation police seized a gun, that they ultimately determined was registered to an SFPD officer and had likely been stolen.

According to a statement by the San Francisco police union, the decorated officer did not realize his gun was taken as there was no sign of a break-in of his car.

NBC Bay Area has learned a holster, clothing and other valuables were taken from the vehicle at the same time: the night of Aug. 11.

The murder of Ezquivel happened four days later.

They also began using data from the tracking bracelet to attempt link Garcia-Pineda to several crimes.

On Thursday, Garcia-Pineda and two other defendants pleaded not guilty to the murder charge, along with charges linked to five robberies and two other shootings.

Friends of Esquivel were still trying to come to grips with his killing. Lariza Dugan Quadra said Esquivel had recently started working with youth at the Central American Recourse Center in the Mission District.

"It’s been a very painful process, not only for his family of course, but also as an organization he was profoundly affiliated with," she said.

Asked if the officer should be disciplined, police Chief William Scott said an internal investigation is in its earliest stages.

"Well, we have to investigate," he said. "I mean it would be very, very irresponsible and premature for me to say what’s going to happen with the officer until we have the facts."

NBC Bay Area's Sergio Quintana contributed to this report.