Police said three masked men ran into the swap meet around 2 p.m. after attacking the security guard outside, hitting him in the head with what appeared to be a hammer. The suspects tried to break jewelry cases but their attempt was unsuccessful.
"As they tried to flee they had another encounter with a security guard inside and that's when the security guard fired one round striking one of the suspects who ultimately died at the scene," said Patrick Mackey of the Fontana Police Department.
Police said 24-year-old Roy Davis of Compton died at the scene. The two other suspects got away.
The security guard was taken to the hospital and was expected to make a full recovery.
Officials said the swap meet was full of shoppers at the time of the incident but no one else was hurt.
Police are reviewing surveillance video from the scene.
Anyone with information is asked to call the Fontana Police Department at (909) 356-8477.