"The punishability of maleficium was accepted as a universally binding and uncontested maxim in legal practice and criminal justice during the period of the Late Middle Ages, when Roman and Canon Law were adopted in addition to the civil law of the regions in a historical process that was termed 'Reception in the Common Law Courts'."
(Lorenz, Sönke/Midelfort, H. C. Erik: Witches and Witch Trials. A historical overview, in: historicum. net; URL: https://www.historicum.net/purl/aj/17.5.2017)
This is described in the "neck justice" introduced by Charles V, Holy Roman Emperor, in 1530 and 1532 and elsewhere.
The persecution of witches in Germany took place largely at the cusp to the Late Middle Ages and the Early Modern Period, between 1560 and 1630.
prosecution was enacted depended on the legal perceptions of the individual
feudal lord, and not on their denomination. For instance, witch trials were
largely prevented in Electoral Palatinate.
Not only did Martin Luther
share the common superstitions of his age, believing in the widespread use of
sorcery and black magic, he also perceived the devil to be an active force.
"His view of witches was defined by his theology. He saw witches – like gypsies, Turks and Jews, who were usually mentioned in one breath – as accomplices of Satan in his ultimate battle against Christ." (Heinz Schilling, "Reformation und Luthers Hexenbild", in: Luther und die Hexen, exhibition catalogue, Rothenburg 2017, p. 209)
Luther's aggressive approach toward witches intensifies from the late 1530s. But his attitudes do vacillate. Occasionally he demands that they be burned at the stake, while other times he insists on their admonition and conversion. Luther's thoughts and writings reflect the evolving view of his times, thus remaining ambiguous.