A Pennsylvania man pleaded guilty Friday to aggravated assault and firearms violations for a drive-by shooting that preceded the killing of a fellow passenger by a police officer, who is now awaiting trial himself.

Zaijuan Hester, 18, of Swissvale, pleaded guilty in the June shooting in North Braddock that prompted then-East Pittsburgh Police Officer Michael Rosfeld to pull over the unlicensed cab a short time later.

Prosecutors said a man was wounded in the abdomen in the drive-by shooting.

Rosfeld's trial for criminal homicide in the subsequent death of 17-year-old Antwon Rose II starts Tuesday in Pittsburgh. His defense lawyer has argued that Rosfeld was justified in shooting Rose in the back as he ran from the cab.

The shooting by the police officer, who is white, of Rose, an unarmed black teenager, was captured on video by bystanders, and prompted protests in the Pittsburgh area.

Investigators said the cab driver identified Hester from a photo array. They said Hester was the only person seen in surveillance video firing from the cab during the drive-by shooting.

The Pittsburgh Post-Gazette said Hester told a judge Friday that he was the shooter and not Rose.

The .40-caliber handgun Hester used, prosecutors said, had been stolen in 2016.

Hester defense attorney Anne Marie Mancuso said he will not be a witness at Rosfeld's trial, the newspaper reported.

Mancuso told the newspaper that Hester made a tough decision to plead guilty. Hester's sentencing was scheduled for June.