A Rockville teen provided the gun and helped plan a shooting and attempted murder at the Rockville Metro station in May, prosecutors said Monday at the 18-year-old’s trial.

Tavares D. Harris, who was 17 at the time of the shooting, faces charges of attempted first- and second-degree murder, along with several other offenses, for his alleged role in the May 18 shooting. During opening statements at the trial Monday, Assistant State’s Attorneys Marybeth Ayres and Patrick Mays accused Harris of providing the handgun used in the crime and discussing the shooting with other teens, including the shooter, in the days leading up to it.

Harris’s co-defendant, 17-year-old Kevin Nguyen, is accused of shooting another teen with whom Nguyen had had several previous confrontations. Montgomery County police said Nguyen shot the teen four times and also shot a female bystander at the crowded Metro station at about 2:30 p.m. May 18. Both victims were taken to the hospital with injuries that were not life-threatening.

“The defendant said that he would bring his gun to the Rockville Metro ... and he would give it to Kevin Nguyen so that he could shoot and kill [the victim],” Ayres said during the prosecution’s opening statements. “Kevin Nguyen was the shooter in this case, but that doesn’t mean that Tavares Harris can’t be guilty of all charges. He aided and abetted the shooter.”

Barry Helfand and David Martella, Harris’s defense attorneys, told the jury that Nguyen was responsible for the shooting, a claim neither prosecutors nor police disputed. Harris was not involved with the various fights or threats that led up to the confrontation between Nguyen and the victim that led to the shooting, Martella said.

Martella admitted that YouTube videos posted before the shooting and entered into evidence will show Harris holding the gun used in the shooting, but he asked the jury to be mindful that several others also hold the weapon during the video, including Nguyen.

“This young man did not shoot anyone on May 18,” he said, explaining how Nguyen planned the shooting himself after friends told him the victim planned to rob him. “... For reasons that are not clear to anyone, including [my client], Kevin Nguyen pulls a gun, the same one seen with Kevin Nguyen in the video, and starts shooting at [the victim].”

Both Harris and Nguyen face two counts each of attempted first- and second-degree murder, as well as one count each for the use of a handgun in a violent crime and conspiracy to commit murder, according to charging documents.

Judge Mary Beth McCormick ruled that, because Harris was 17 at the time he was arrested and due to the violent and serious nature of his charges, he will be charged as an adult. Nguyen was also being charged as an adult as of Monday, court records state.

Nguyen is scheduled to stand trial in December, according to an online search of court records Monday.