But this story actually started in a bizarre fashion on Saturday, when Livermore police arrested the 18-year-old.
"He got into a fight with his friend and it appeared he might have been under the influence of methamphetamine or something else," said Dublin Police Department Chief Tom McCarthy. "Mr. Herrera was actually threatening to eat his friend."
Chief McCarthy says officers had to Taser the teenager when he turned on them.
Police are awaiting a toxicology report to determine exactly what type of drugs Herrera was on.
"We hearing methamphetamine right now, but I also heard it may have been bath salts," said Chief McCarthy.
Synthetic bath salts are an increasingly popular drug among young people. They're sold openly on the Internet in small colorful packages, marketed specifically toward the young generation with names like "Mr. Nice Guy" and "Barely Legal."
They affect the central nervous system, making them extremely dangerous. They could cause irrational and violent behavior, just like that reportedly exhibited by Herrera.
"These types of drugs can have a tremendous effect on the development of young people's brains," said DEA Assistant Special Agent in Charge Bruce Goldberg. "The purity, the strength, the side effects are all unknown."
Herrera was still acting erratically the day after his arrest.
Dublin police were called Sunday evening to Herrera's mother's apartment on the 1700 block of Dublin Meadows Street.
Herrera had left the hospital that day against the doctor's advice. He was causing a scene. His frightened sister was there and called her boyfriend, who then called 911.
Police say Herrera confronted officers at the door with a metal baseball bat.
"Mr. Herrera took the baseball bat, hit the officer in the hand that was holding the firearm," said Chief McCarthy. "He immediately pulled the bat in an upward motion, like you would do a downward swipe with a baseball bat."
That's when investigators say the officer fired the shots that killed Herrera.
Police say the teenager has a history of weapons possession, assaults, drug use, and resisting arrest.