Police responded to a 911 call from a customer inside Bank of the West at 33301 Alvarado Niles Rd. The caller said the bank was being robbed by someone wearing all dark clothing and a mask, police said.
Police received a second phone call from an alarm company, who said a suspect was still in the bank and armed with a firearm.
An arriving officer saw the suspect fleeing the scene. The officer began following the suspect's vehicle, and a passenger in the vehicle shot at the officer, though no injuries were reported in the exchange.
The passenger left the vehicle near the intersection of Arizona Street and Dowe Avenue and fled into the rear yard of a nearby home.
The driver was taken into custody after the passenger fled, police said.
Police heard gunshots fired while they were establishing a perimeter around the home the suspect had fled into. The suspect was soon found in the backyard of the home. He was dead with a gunshot wound to the head, police said.
Anyone with information related to this case is encouraged to call Union City police at (510) 471-1365.