SAN FRANCISCO — A San Francisco police officer survived after being shot more than once during a shootout Sunday night in the Bayview District with a person in a vehicle who also was critically wounded, authorities said.

It all happened after police were notified about 10:30 p.m. that a vehicle suspected in an East Bay robbery was entering San Francisco from the Bay Bridge. Police did not release any details on the robbery or give a specific location where it occurred.

In a statement, San Francisco police said officers found the vehicle traveling on 5th Street near Folsom Street and tried to stop it at Mission and 1st streets. Police said that when the vehicle didn’t stop, officers pursued it through city streets until it crashed in the area of Bayshore Boulevard and Jerrold Avenue.

Police said that as officers encountered the vehicle, the passenger shot at them and hit the officer more than once. At least one officer shot back and hit the suspect, police said.

Originally, police said they believed the driver did the shooting.

In a news conference aired on social media, San Francisco Police Chief Derrick Lew indicated the officer who was wounded was a woman. Police did not identify the officer or the others who fired their guns. Lew said more than one officer fired back.

Both the officer and suspect were rushed by officers to a hospital for treatment of injuries that were potentially fatal, police said. The officer underwent surgery and is expected to survive, according to a statment from the San Francisco Police Officers Association. Lew said the officer has a “long road to recovery.”

SFPOA president Louis Wong in a statement that officers were “deeply grateful to the responding officers whose courage and quick actions helped bring this incident under control and to the paramedics, emergency medical personnel, doctors, nurses and hospital staff whose skill and dedication are helping save this officer’s life and support their recovery.”

Lew said the suspect remained in critical but stable condition late Monday morning.

The driver of the vehicle ran away from the scene, police said. They added that officers arrested that person in the area of Bayshore Boulevard and Costa Street.

Police said they also recovered two guns from the scene.

The San Francisco County District Attorney’s Office is investigating the shooting, as are the San Francisco Police Department’s investigative services division, its internal affairs department and it’s department for police accountability.

This is a developing story. Please check back for updates.