A San Francisco officer and a robbery suspect were hospitalized after a car chase led to a shootout Sunday night, police said.

At 10:29 p.m., officers were alerted that a vehicle linked to a robbery had entered the city from the Bay Bridge, according to the San Francisco Police Department.

Officers found the vehicle near Fifth and Folsom streets and tried to pull it over near Mission and First streets. Police said the driver fled, prompting officers to pursue through city streets.

The chase ended when the suspect vehicle became disabled near Bayshore Boulevard and Jerrold Avenue. Police said the driver then opened fire on officers, striking one of them multiple times. This prompted them to shoot back.

The driver fled on foot, while the passenger was wounded during the shooting, police said. Officers sent the injured officer and passenger to a local hospital.

The officer was treated for life-threatening injuries, police said. The passenger of the suspect vehicle was also treated for life-threatening injuries.

More officers searched the area and later found the driver near Bayshore Boulevard and Costa Street, where he was taken into custody. Investigators also recovered two firearms.

The San Francisco District Attorney’s Office, the Police Department’s Investigative Services Division and Internal Affairs Division, and the Department of Police Accountability are investigating the shooting.

Police said a public town hall on the officer-involved shooting will be held within 10 days. Anyone with information is asked to contact the department at (415) 575-4444 or text a tip to TIP411.