Typical for the ancient beetle suborder Adephaga to which they belong, they have paired pygidial glands in the lower back of the abdomen.
These are well developed in ground beetles, and produce noxious or even caustic secretions used to deter would-be predators.
In some, commonly known as bombardier beetles, these secretions are mixed with volatile compounds and ejected by a small combustion, producing a loud popping sound and a cloud of hot and acrid gas that can injure small mammals, such as shrews, and is liable to kill invertebrate predators outright.

To humans, getting "bombed" by a bombardier beetle is a decidedly unpleasant experience.
This ability has evolved independently twice, as it seems, in the flanged bombardier beetles (Paussinae), which are among the most ancient ground beetles, and in the typical bombardier beetles (Brachininae), which are part of a more "modern" lineage.
The Anthiini, though, can mechanically squirt their defensive secretions for considerable distances and are able to aim with a startling degree of accuracy; in Afrikaans, they are known as oogpisters ("eye-pissers").
In one of the very few known cases of a vertebrate mimicking an arthropod, juvenile Heliobolus lugubris lizards are similar in color to the aposematic oogpister beetles, and move in a way that makes them look surprisingly similar to the insects at a casual glance.

A folk story claims that Charles Darwin once found himself on the receiving end of a bombardier beetle's attack, based on a passage in his autobiography.
Darwin stated in a letter to Leonard Jenyns that a beetle had attacked him on that occasion, but he did not know what kind:
A Cychrus rostratus once squirted into my eye & gave me extreme pain; & I must tell you what happened to me on the banks of the Cam in my early entomological days; under a piece of bark I found two carabi (I forget which) & caught one in each hand, when lo & behold I saw a sacred Panagæus crux major; I could not bear to give up either of my Carabi, & to lose Panagæus was out of the question, so that in despair I gently seized one of the carabi between my teeth, when to my unspeakable disgust & pain the little inconsiderate beast squirted his acid down my throat & I lost both Carabi & Panagæus!
Typical for the ancient beetle suborder Adephaga to which they belong, they have paired pygidial glands in the lower back of the abdomen. These are well developed in ground beetles, and produce noxious or even caustic secretions used to deter would-be predators. In some, commonly known as bombardier beetles, these secretions are mixed with volatile compounds and ejected by a small combustion, producing a loud popping sound and a cloud of hot and acrid gas that can injure small mammals, such as shrews, and is liable to kill invertebrate predators outright. 
To humans, getting "bombed" by a bombardier beetle is a decidedly unpleasant experience. This ability has evolved independently twice, as it seems, in the flanged bombardier beetles (Paussinae), which are among the most ancient ground beetles, and in the typical bombardier beetles (Brachininae), which are part of a more "modern" lineage. The Anthiini, though, can mechanically squirt their defensive secretions for considerable distances and are able to aim with a startling degree of accuracy; in Afrikaans, they are known as oogpisters ("eye-pissers"). In one of the very few known cases of a vertebrate mimicking an arthropod, juvenile Heliobolus lugubris lizards are similar in color to the aposematic oogpister beetles, and move in a way that makes them look surprisingly similar to the insects at a casual glance.
A folk story claims that Charles Darwin once found himself on the receiving end of a bombardier beetle's attack, based on a passage in his autobiography. Darwin stated in a letter to Leonard Jenyns that a beetle had attacked him on that occasion, but he did not know what kind:
A Cychrus rostratus once squirted into my eye & gave me extreme pain; & I must tell you what happened to me on the banks of the Cam in my early entomological days; under a piece of bark I found two carabi (I forget which) & caught one in each hand, when lo & behold I saw a sacred Panagæus crux major; I could not bear to give up either of my Carabi, & to lose Panagæus was out of the question, so that in despair I gently seized one of the carabi between my teeth, when to my unspeakable disgust & pain the little inconsiderate beast squirted his acid down my throat & I lost both Carabi & Panagæus!
Ground beetle