A Northern California police chief says a gunman who confronted two officers at a Starbucks targeted the pair minutes after casing the coffee shop.

Vallejo Police Chief Andrew Bidou said at a press conference Monday that the officers were on a coffee break Sunday when the suspect appeared in the doorway of the shop and "attempted to assassinate" them.

Police say the suspect was wearing body armor and tried to shoot the assault-style weapon, but it malfunctioned.

The suspect fled on foot, and police chased him, shooting him three times. He was taken to the hospital in serious condition.

Bidou said the 41-year-old suspect is the father of a 2-year-old boy who may have accidentally shot himself earlier Sunday in nearby Suisun City.