This gruesome episode comes from the story of Cadmus which is told in Ovid's 'Metamorphoses' (III: 1-151). Cadmus was sent by the Delphic oracle to follow a cow and build a town where it sank from exhaustion. The cow stopped on the future site of Thebes, and Cadmus, intending to sacrifice it, sent his followers to get water from the neighbouring well of Ares. They were killed by the guardian of the well, a dragon who was the son of Ares. Cadmus then killed the dragon and on the advice of Athena sowed its teeth in the ground, from which sprang up armed men who slew each other, with the exception of five who became the ancestors of the Thebans.
In the background of this painting is Cadmus killing the dragon. The composition was engraved by Hendrick Goltzius in 1588, the same year that the picture was painted.