MODESTO (CBS13) — Authorities are investigating after a chase near Modesto ended with a deputy-involved shooting that sent two people to the hospital — one in critical condition.

The Stanislaus County Sheriff’s Office says that around 2 a.m. Tuesday, a deputy attempted a traffic stop for vehicle code violations near Torrid and N. Carpenter roads but the suspect took off. Unknown to the deputy at the time, the vehicle had five teenage passengers inside.

READ MORE: California's Power Grid Operator Urges Residents To Conserve Energy Amid Heat Wave

READ MORE: Sacramento Police Officer Accused Of Domestic Violence No Longer Facing Charges

The chase continued for seven miles through city and county streets. Eventually, it ended near Finch and McClure roads after authorities used a PIT maneuver, according to a sheriff’s department statement

At one point, the driver allegedly used the car as a weapon in Modesto, driving towards law enforcement vehicles.

Deputies shot at the car, hitting the driver, a 17-year-old male, and a passenger. The driver was critically injured. He was transported to a local area hospital. That passenger, along with three other passengers were examined at the hospital, treated, and released.

MORE NEWS: Sacramento Zoo Enforces Early Closures As Heatwave Hits Valley

The incident remains under investigation.