Police shot and killed an armed man outside a San Ramon 7-11 early Thursday morning after an emergency call reporting he was trying to rob the place.
The store clerk called 911 just after 2 a.m., saying a man with a gun demanded cash and forced him to get out of the store.
Officers from the sheriff's office, Danville, San Ramon and Lafayette police departments responded to the location and at about 3:30 a.m., the gunman came out of the store and started a standoff with cops.
At one point, the gunman raised his gun and aimed it at the police so several officers fired, killing him, police said.
James Sanos was outside the store when the standoff took place and watched it all go down. He described it as being like "a scene out of a movie" and said the suspect had a drink in one hand and the gun in the other during the standoff.
Sanos said the suspect paced around outside the store for about 20 minutes and that the police gave him several chances to surrender.
Police say the suspect was driving a stolen car. They placed spike strips behind the front tires in case he had tried to escape in the car.
Investigators say the suspect might have also been using a stolen gun that he got from robbing a gun shop in Danville Wednesday night.