Authorities say it happened at the store on Olive and R Street Friday afternoon.
Officers say 39-year-old Stephan Stanley began breaking glass in the jewelry department and started taking items.
They say two good Samaritans attempted to hold Stanley down when he attempted to use pepper spray on them.
Instead, he accidentally sprayed himself.
Officers arrived, arrested him, and booked him into the Merced County Jail.