SAN DIEGO -- Two San Diego police officers were shot Thursday night, and one died, authorities said.

.@ChiefZimmerman just left the hospital where our second Officer has just come out of surgery. He is expected to survive!! — San Diego Police (@SanDiegoPD) July 29, 2016

A suspect was in custody, CBS San Diego affiliate KFMB-TV reported, adding that he was shot and was being treated at a hospital.

A search was on for any others who might have been involved.

Residents in the vicinity of the shooting were told to shelter in place, and the public was urged to avoid the area.

Get Breaking News Delivered to Your Inbox

The officers were shot several times in the torso while making a traffic stop.

They were part of the San Diego PD Gang Suppression team, but there was no word on any motive for the shooting or whether it was an ambush, police told CBS News.

The gunfire came at a time when law enforcement officers around the country on heightened alert following the killing of officers in Dallas and Baton Rouge, Louisiana, this month.