Merced police responded to the intersection of 21st and V Streets in Merced on Friday afternoon, where 911 callers reported seeing a man with what looked like an assault rifle standing in front of a home.
When officers arrived, the suspect - 51-year-old Brian Arredondo - barricaded himself inside a nearby home with the weapon.
After a standoff that lasted more than five hours, Arredondo finally came out of the home and surrendered to police.
After searching the house, police found that the rifle he had been spotted with was actually a BB gun and not an actual rifle.
Arredondo has been booked into the county jail for resisting arrest.