A 14-year-old boy charged with murder was under court supervision in three previous criminal cases, including a gun possession case, at the time a stranger was slain outside a McDonald’s last month, D.C. prosecutors said.

The teen is charged with first-degree murder while armed in the July 4 fatal shooting of Antonio Gardiner, 36, of Oxon Hill. Authorities said the shooting occurred after a disturbance in the fast food restaurant in the 1500 block of Pennsylvania Avenue SE in the Hill East neighborhood.

D.C. police have said the disturbance, which occurred shortly before 11 p.m., involved fireworks being ignited near the McDonald’s. At some point, Gardiner, a McDonald’s customer, went outside to investigate and was shot. The teen was arrested two days later and charged as a juvenile.

In seeking to have the teen continued held pending trial, Scott Leighton, a prosecutor in the D.C. attorney general’s office, told a judge on Tuesday that the youth has been “implicated in other murders” that occurred that holiday weekend. Leighton did not comment further on those accusations, and the teen has not been charged in additional cases.

D.C. Superior Court Judge Andrea Hertzfeld ordered the youth to remain in custody.

The hearing was virtual. The teen, who is in the custody of the Department of Youth Rehabilitation Services, was not seen on camera since he was not in the courthouse. Instead, his attorneys, the judge and prosecutors appeared. The teen was heard answering several questions posed by the judge.

The Washington Post was allowed to view the hearing on the condition that neither the teen’s identity nor the secure location where he was being held were made public. D.C. law shields the identities of minors charged as juveniles in criminal cases.

The hearing was in preparation for a trial scheduled to begin next month. But attorneys suggested that they might need to reschedule the trial as both sides test evidence for DNA.

Leighton said authorities found a gun that a witness told police the youth discarded when he was running from police before his arrest on July 6. Leighton said the youth was recorded on the restaurant’s security video pointing a weapon at the victim.

During the hearing, the teen’s attorneys asked Hertzfeld to release their client into the custody of his mother or a youth halfway house until trial.

But prosecutors objected to the teen’s release. They cited prior offenses that they said also occurred while the youth was living with his mother.

“We understand that [the suspect] is very young, but he seems very easily persuaded to engage in behavior that puts District residents and himself at risk,” Leighton said.

Leighton said his office has not offered a plea deal. Such an offer, Leighton said, would have to include discussions with D.C. Attorney General Karl A. Racine.

The next hearing is scheduled for Aug. 20.