The officer who died was Jonathan "JD" DeGuzman, 43, a 16-year department veteran and father of two, police Chief Shelley Zimmerman said Friday at a news conference.
Officer Wade Irwin, 32, a nine-year veteran, was in serious condition but is expected to survive, Zimmerman said.
Jesse Michael Gomez, 52, was charged in the shootings, Zimmerman said, though she did not specify the charges. Zimmerman said Gomez was shot in the upper torso and was in critical condition at a hospital.
In their search for other suspects, police surrounded a house and stormed the residence after an a six-hour standoff, CNN affiliate KFMB reported
. Nobody was found inside but Marcus Antonio Cassani, 41, was taken into custody a short distance away, KFMB reported.
Zimmerman said Cassani was being held on an outstanding warrant and investigators are not sure if he was involved in the shootings. Police did not say what the outstanding warrant was for.
The shooting occurred late Thursday night in the Southcrest section in the south part of the city, Zimmerman said.
The two officers, members of the department's gang suppression unit, radioed shortly before 11 p.m. that they were going to stop someone, Zimmerman said. She said investigators have not determined whether it was a vehicle or a pedestrian stop or why officers were making the stop.
Almost immediately, they called for emergency backup, Zimmerman said.
Asked whether the shooting was an ambush, the chief said it wasn't clear.
Zimmerman said officers who responded to the pair's call for help made a heroic attempt to save the life of their other colleague, rushing him to a hospital in a squad vehicle.
"(There were) heroic efforts by the officers on scene, heroic efforts by the doctors to save his life," she said, adding that he had been shot in the upper body more than once.
Zimmerman said both officers wore body cameras, and other videos of the incident are available.
The chief said Irwin regained consciousness and was able to talk about what happened. He is expected to make a full recovery.
Zimmerman said she'd worked personally with DeGuzman, who she called a loving husband and father who "talked about his family all the time."
"I know him, and this is gut-wrenching," she said. "He cared. He came to work every single day just wanting to make a positive difference in the lives of our community. And last night he lost his life trying to make a positive difference and trying to protect our community."
Officers' shooting deaths up 79% from last year
On the subject of police shootings, Zimmerman said: "We have seen this happen way too many times just in the last few weeks."
Thursday's violence comes as this year's shooting deaths of U.S. law enforcement officers outpaces those of 2015.
As of Friday, 34 U.S. law enforcement officers had died from shootings in 2016, a 79% increase from the total in the same period last year, according to the National Law Enforcement Officers Memorial Fund
, which keeps data on officers killed on the job.
Many of this year's deaths came during a summer of heightened tensions between law enforcement and the communities they serve after civilian cameras captured the shooting deaths of Alton Sterling
in Louisiana and Philando Castile
in Minnesota at the hands of police.
Annual rates of officer shooting deaths have fluctuated over the past 10 years. The decade's highest total came in 2011, with 73 officers shot dead.
Firearms were responsible for 41 of 123 officer fatalities in 2015, according to the memorial fund, but it was not the No. 1 cause of death. Traffic-related incidents, such as automobile and motorcycle crashes, caused 48 deaths.
So far in 2016, gun-related deaths are the leading cause, followed by 24 traffic-related fatalities.