Deputy San Diego County District Attorney Christine Treviso, 51, used a handgun during the stop Thursday evening, the North County Times reported. Lt. Leonard Malta, a spokesman for the Oceanside police, said an officer was talking to her through her car window at the time.
Police had been tracking her cellphone because of reports she had threatened to kill herself.
Treviso joined the prosecutor's office in 1990. She had handled a number of high-profile and emotionally draining cases, winning the conviction in 2006 of a burglar who had killed a homeowner by stabbing her more than 80 times.
Herbert Weston, a defense lawyer, said he had known Treviso since they were young lawyers.
"She worked hard at it, but on the other hand, she was brought up as I was brought up: you do your job, but at the end of the day, you say, 'Let's go have a drink together; let's be friends,'" Weston said. "From a defense standpoint, she was just a really good person to try a case against."