A gang member who pleaded no contest in connection with a drive-by shooting in Long Beach that left five people injured was sentenced Friday to 33 years and eight months in state prison.

David Ham of Long Beach pleaded no contest last November 30 to three counts of attempted murder stemming from the February 15, 2015 shooting.

He also admitted gang and gun allegations, according to the Los Angeles County District Attorney’s Office.

Pair Pleads Not Guilty to 12 Counts of Attempted Murder Following Long Beach Shooting

Ham was driving in the 200 block of West 14th Street when he encountered a group of people at a party, according to Deputy District Attorney Tapti Patel.

Ham’s passenger—who apparently believed the group was part of a rival gang—allegedly opened fire on the crowd and injured five people, according to the prosecutor.

Ham and the teenage passenger were arrested the next day. Details of the case against the teenager—whose case has been sent to juvenile court—were not available.