A correction to an earlier version of this article has been appended to the end of the article

MARTINEZ — A man accused of murdering a 15-year-old boy when he was 17 will be prosecuted as an adult.

Bobby Brown III, 19, of Richmond, is facing murder charges with enhancements for alleged gang membership and lying in wait. He was charged in connection with the March 10, 2016, shooting death of William Malik Barnes, 15, of Richmond.

Brown’s alleged accomplice, Parrish Rauls, of Richmond, pleaded no contest in February to accessory after the fact, according to court records. He has not been sentenced yet. Brown is scheduled to have a preliminary hearing in July.

According to witness testimony from Rauls’ preliminary hearing last year, a security video camera showed the shooter hanging out around an apartment complex, St. John’s Apartments, at 121 MacDonald Ave. in Richmond, then rushing toward where Barnes was. Barnes was shot several times and died at the scene.

About 10 minutes before the shooting, Rauls and Barnes were picked up on a security camera at a liquor store. When police contacted Rauls, they recovered a text message to Brown on his phone, saying that Barnes was at the store.

A Richmond police detective said Rauls had “no explanation” to why he sent that text. The detective added that Brown had been in “a shootout” with Barnes days before Barnes was killed, and added that an informant had told him “they can have the B’s but they can’t have John’s,” referencing two apartment complexes.

Rauls’ attorney argued that his client had sent the text to warn Brown of Barnes’ presence, not to help him commit a crime. But Judge Joni Hiramoto was skeptical, and ordered Rauls to stand trial.

“If Mr. Rauls had sent that text to Brown to warn him…that would have been the first thing out of his mouth,” she said, according to the transcript.

Brown has pleaded not guilty and his preliminary hearing has been set for July 11 at 8:30 a.m., in Richmond.

Correction: July 5, 2018

An earlier version of this story incorrectly stated a Richmond police officer testified that Parrish Rauls told him Bobby Brown was in a shootout with a 15-year-old Richmond boy who was killed days later and had talked about gang turf. In fact, an informant — not Rauls — told the officer about the shootout and gang turf talk.