Representatives from the sheriff's department confirmed a recent purchase of about 300 handguns, all of which turned out to be defective. It wasn't until they started testing them out at a local firing range, that deputies learned there was a problem.

Ultimately, a glitch in their design meant the firing mechanism turned out to be faulty.

Although it was determined that none of the deputies were in danger of getting hurt, they do need to have access to guns that actually fire.

The .40 caliber guns cost more than $650 a piece, according to a spokesperson, and the company they bought the weapons from was contacted immediately.

Deputies started turning in the guns and swapping them out for their old weapons right away. During this process, they said, they needed to contact other law enforcement agencies, like the Stockton and Tracy Police Departments, to help fill gaps in patrol coverage.

Representatives from the gun manufacturer reportedly flew out to San Joaquin County late last week in order to replace the faulty gun parts. The repair was expected to take one to two days to complete, they said, and each deputy was reunited with their new weapon before the close of the weekend.

This incident marks the first time an entire crop of faulty guns has been delivered to a law enforcement agency.