The witch-cult hypothesis suggests that the things told about witches in Europe were in fact based on a real existing pagan religion that worshiped a horned god. The most famous elaboration of this theory was The Witch-Cult in Western Europe, a book written in 1921 by the British anthropologist Margaret Murray. However, Murray was not the first who came up with the idea of an ancient cult of witches that was persecuted during the Great Witch Hunt of the Early Modern Age.
18th & 19th century
Precursors of Murray's theory can be found in the 18th and 19th centuries.
In 1749, the Italian Girolamo Tartarotti stated that the religion persecuted by the church was based on pagan traditions, though he did not really claim that it was the pagan religion itself. In 1749 he wrote the treatise De Congresos Notturno Delle Lammie (the night meeting of witches), followed in 1751 by the book Apologia del Congresos Notturno Delle Lammie (Defense of the night meeting of Witches), intended to counter the criticisms on his earlier dissertation.
Karl Ernst Jarcke
In 1828 the German Karl Ernst Jarcke, a professor of criminal law at the University of Berlin, claimed that the religion persecuted during the witch hunt was not satanic, but in fact of pagan origin.  Jarcke's thesis was that paganism after Christianity was not totally eradicated and still had many followers among the rural population. The church was afraid of this competition and had therefore condemned this religion as "Satanism". According to Jarcke, this religion gradually evolved to a worship of the horned god, who came to be regarded by his followers as Satan.
In 1839 Jarcke's theories were taken over and adapted by another German, Franz-Josef Mone. Mone was a staunch Roman Catholic and heavily influenced by Germanic romanticism. He denied that this pagan cult with its human sacrifices and nocturnal orgies was of Germanic origin, and was convinced that it could be traced back to Hellenistic sources. According to Mone, it would have been based on the Greco-Roman mysteries and brought to Germany by Greek slaves. 
Jacob Grimm is now best known for the fairytales he wrote with his brother (as 'The Brothers Grimm'), but in the 19th century he was also a leading German academic and a famous philologist and folklorist. In 1844 he supported the notion that the early modern image of the witch was in fact a merger of several elements of pre-Christian Germanic traditions with later medieval stereotypes of heresy, but he could not believe that the witch-cult had been a pagan religion.  The idea that witchcraft had in fact been an active pagan tradition was formulated for the first time in 1862 by the French historian Jules Michelet.
In 1862 the French historian Jules Michelet published "La Sorcière"(The Witch - translated into English as Satanism and Witchcraft)  in which he further adapted the theory. Michelet, an anticlerical liberal who despised both the Roman Catholic Church and the absolute monarchy, argued that the witch cult was popular among the farmers, while Roman Catholicism was especially adhered to by the upper classes. He claimed that the witches had been mostly women (he had great admiration for the female sex, that he placed above the male sex), and that they were great healers, whose knowledge would form the basis of much of modern medicine. He also believed that they worshipped the god Pan who during the witch persecutions would be equated with the Christian figure of the devil.
In 'La Sorcière', Michelet defended the thesis that witchcraft emerged during the 12th and 13th century as a result of protests of medieval serfs against the oppressive social order. According to him, they held secret nightly meetings with pagan dances where they performed satires on lords and priests. Michelet calls the Sabbath the 'black mass', the central figure being not the devil, but a woman he describes "with the face of Medea" and "a tragic, deep gaze that was born out of suffering". This romantic figure, the priestess of the cult, invented and organised the whole Sabbath. In Michelet's work we also find references to a fertility cult to ensure an abundant harvest. It is a romantic vision of witchcraft apparently intended to rehabilitate oppressed groups like women and serfs. In the United States his book was read by one of the founding mothers of the woman suffrage movement, Matilda Joslyn Gage, who saw the witch-hunts as a classical example of male suppression of women.
Matilda Joslyn Gage
In 1893 an American suffragist named Matilda Joslyn Gage published Woman, Church and State in which she claimed that the prehistoric society had been matriarchal and that there had existed a worship of the Great Goddess. Witches would have been pagan priestesses who wanted to preserve this ancient religion. 
In 1897 the English scientist Karl Pearson, Professor of Applied Mathematics at University College London and an amateur historian and anthropologist, expanded the theory of Jules Michelet. Pearson agreed with the theory that the witch cult was a remnant of a prehistoric matriarchal society. He presumed that in the Christian era this religion began to focus on a male deity, who was then compared with the Christian devil. Pearson also defended the idea that Joan of Arc had been one of the last priestesses of the practices and beliefs of this 'primitive' group and he principally opposed worship of goddesses in general. 
Charles Leland was an American folklorist and occultist who traveled throughout Europe. He was also an adherent of the theories of Michelet. In 1899 he published Aradia, or the Gospel of the Witches, allegedly a sacred text for the Italian witch. It did not mention a horned god, but there was definitely a male deity known as Lucifer, as well as a female deity, the goddess Diana. Leland's work would provide the inspiration for the pagan witch religion of Stregheria.
The Witch-Cult in Western Europe by Margaret Murray was published in 1921, at a time when the influence and success of The Golden Bough of anthropologist James George Frazer was at its height. At that time Margaret Murray was celebrated in university circles as the expert on western witchcraft. In the period 1929-1968 she even wrote the article on witchcraft in the successive editions of the Encyclopaedia Britannica. In 1962, her main work was reprinted by Oxford University Press. Murray's theory, as she explained in this book and the subsequent The God Of The Witches (1933) consists of the following elements:
- Until the 17th century there was a religion, much older than Christianity, which all over Western Europe had supporters both among ordinary people and the ruling classes.
- Central to the worship stood a horned god with two faces, known to the Romans as Janus or Dianus. (This cult of Dianus was of the type James Frazer described in detail in "The Golden Bough").
- The horned god represented the cycle of seasons and harvests. It was believed that he died and periodically returned to life.
- On earth, the horned god was represented by chosen human beings. There were some celebrities among them, such as William Rufus, Thomas Becket, Joan of Arc and Gilles de Rais. They all died a tragic death as a ritual sacrifice to insure the resurrection of the god and the renewal of the earth.
- In the villages the witches meetings were presided by the horned god. Pre-Christian observers of this events might have thought that these witches were worshiping the devil, when in reality they were celebrating the pre-Christian god Dianus.
- The preservation of this ancient religion was entrusted to a variety of indigenous peoples, small in stature, who were driven out from their land with each new invasion. This would also explain the stories about fairies, gnomes and other 'small people'. These creatures were very shy but were able to pass the knowledge of their religion to ordinary people. The witches were their pupils and thus the heirs of the ancient religion.
- According to Murray, the (local) covens consisted of thirteen members: twelve ordinary men and women, and an officer. All members were required to hold a weekly meeting (named 'esbat' by Murray) and to attend the larger Sabbats.
- There was a strict discipline in the covens, and whoever missed a meeting could be severely punished and was sometimes put to death.
- The organization and structure were so good that Christianity had to wait until the Reformation before getting a stronger grip on the population. A blatant attack on the influential rival was needed, and that occurred with the great witch persecutions.
From the 1920s on, Margaret Murray's theory was assailed by critics such as George Lincoln Burr, Hugh Trevor-Roper and more recently Keith Thomas. Other scholars, however, insisted that despite the exaggerated claims she made there is still some truth in her theory. One of them, Arno Rune Berg, noted in his book "Witches, Demons and Fertility" (1947) a number of 'ordinary' elements that were cited in descriptions of the Sabbath. This could be an indication there had actually been meetings, which would have transformed into phantasmagoria later, under the influence of the imagination.
Reception of the theory by modern scholars
The idea of a witch cult that until early modern times managed to survive, is now largely obsolete. Most but not all modern scholars of witchcraft generally dismiss it as romantic nonsense.
One of those researchers who do not totally dismiss the witch-cult hypothesis is the 20th century Italian historian Carlo Ginzburg who wrote about the Benandanti and their fertility cult in the North Italian countryside in the 16th and 17th century. Between 1575 and 1675, they were persecuted as heretics or witches by the Inquisition. The Benandanti said they were wrongly accused and that they were in fact so deeply religious that they battled against witches in the night sky. They also claimed to be able to leave their bodies and fly to meet their enemies. According to Ginzburg the prosecutions of the church led to the eradication of the cult of the Benandanti.
There have been some pharmacological explanations about the flying claims; hallucinations of flying are associated with families of drugs, such as belladonna (herb) or atropine and scopolamine.
Most modern scholars of the history of witchcraft agree that it is very unlikely that such a witch-cult really existed, or that this cult or religion came to an end because the Christian church wanted to eradicate the followers of a pagan tradition. One of these modern critics, social anthropologist Alan Macfarlane criticized Murray's work in his book Witchcraft Prosecutions in Essex, 1500-1600: A Sociological Analysis. He says that his main criticism on Murray's work is that she used all sorts of things of European folklore, pulling them out of context thus creating a totally wrong image of European witchcraft. He argued that she had taken the things that people believed as a representation of what actually happened. Although in her book she had shown that people believed in a witch-cult, she failed to show that there really had been such a thing. From his own research on witchcraft in Essex Macfarlane concluded that he did not find much of the claims she had made: no traces of a Sabbath, Coven or the demonic pact were found, except perhaps with the witch trials of 1645. In his study he had found no evidence that there had been a pagan, underground cult, nor any organization of people who where called witches.
Likewise Keith, Thomas criticises Murray for her selective use of evidence and what he calls 'the deficiencies of her historical method'.
Recently, feminist scholars have taken up Murray's thesis about persecuted witches in Medieval Europe as members of a religion of the Mother Goddess which originated in the Paleolithic era. Also, professor Tanya Marie Luhrmann's description of modern witches in her book Persuasions of the Witch's Craft: Ritual Magic in Contemporary England does not resemble in any way the devil-worshipping creatures to be feared like the ones pictured in the Malleus Malificarum. 
Influence on modern witchcraft
Leland's idea of an 'old religion' and Murray's surviving pagan cult would inspire subsequent 20th century modern witchcraft movements like Wicca. Many of these movements, however, generalize the duality such that the Horned God, a male archetype, represents the sun and a female archetype, the Earth Mother, is of the earth. In ritual, a priest and priestess may act in these roles, using the symbols of the athame and the chalice.
- The Triumph of the Moon - The Rise of Modern Pagan Witchcraft, Ronald Hutton, Oxford University Press, 1999,
- English translation of Jules Michelet's "La Sorcière"
- Frazer, James George, Chapter III: Sympathetic Magic; 1. The Principles of Magic, The Golden Bough: A study of magic and religion, Project Gutenberg
- Encyclopedia of Social and Cultural Anthropology: 'Witchcraft and Sorcery'
- T.M. Luhrmann: 'Persuasions of the Witch's Craft: Ritual Magic in Contemporary England', 1989.
- The witch history: early modern and twentieth-century representations, Diane Purkiss
- C.J. Jung, Man and His Symbols
- Starhawk, The Spiral Dance