A suspected gunman was killed Wednesday night when the SUV he was riding in slammed into a tree after a drive-by shooting in San Bernardino, authorities said.

The incident occurred about 9:50 p.m. in the 1200 block of Blackstone Avenue, according to Sgt. Gerald Beall of the San Bernardino Police Department.

Officers responded to reports of shots fired and a crash at the location, where they found a driver and two passengers inside a black Dodge SUV and another passenger on the sidewalk, police said.

One of the passengers had apparently fired several shots at a person who was standing in the driveway of a home, Sgt. Beall said. The SUV then sped away before the driver lost control and hit a tree.

The 22-year-old suspected gunman, identified as James Eley, died of his injuries after being ejected from the SUV during the crash, according to authorities. The intended target of the shooting was unharmed.

The SUV driver, Ronald Lewis, and surviving passengers, Shonte Tuner and Jackson Kendrick, ran from the scene but were later found in local hospitals and arrested, according to police Lt. Richard Lawhead.

“Officers located two handguns at the scene near the collision,” Lawhead said in a news release.

Lewis was booked into the San Bernardino County Jail for suspicion of attempt murder, vehicular manslaughter, and hit-and-run with injury. Kendrick was booked for suspicion of attempted murder.

The suspects and the intended victim all have ties to local criminal gangs, according to Lawhead.

Anyone with additional information is asked to contact Detective Devin Peck at 909-384-5664, or Detective Sharon Bonshire at 909-384-5623.