A firing pin lock for firearms is provided. The firing pin lock is a single piece of resilient metal that includes a pocket for receiving the head of the firing pin to prevent inadvertent discharge of the firearm. The firing pin lock can be mounted laterally in the bolt carrier group and is deflected outwardly by the action of the hammer.