The incident happened Friday around 1:06 p.m. at Maaz Jewelers, which is located inside the Tanforan Mall, police said.
Authorities said five men who appeared to be in their teens or early 20s approached the store and one of them entered with a crowbar.
Store surveillance video shows the suspect using the crowbar to smash a jewelry display case when the owner, Usman Bhatti, comes up and tries to pull the suspect away.
Officers said the suspect then raised the crowbar as if he was going to hit the shop owner.
That's when the Bhatti, who has a concealed carry permit, pulled out a gun and pointed it toward the suspect while yelling for him to stop, police said.
The suspect then ran out of the store when a second suspect, who was part of the group and standing near the entrance of the store, pulled out a gun and pointed it at Bhatti.
Authorities said the store owner raised his firearm again and pointed it at the man with the gun.
The suspect ran toward the group and all the suspects fled toward a department store where they managed to getaway.
The store owner never fired his weapon during the incident and neither did the suspect who was armed with a gun.
"I’m not trying to be a hero or a macho man..it just happened very quick and I had no choice," Bhatti told KTVU.