The popular image of a witch, which you can see everywhere right now in the form of Halloween costumes and decorations, is a woman with a pointy hat and warty nose stirring a cauldron or flying on a broom. How did that odd choice of transportation get tied to witches and locked into our collective imagination?

One proposed explanation has its roots in a pagan ritual where people danced astride poles, pitchforks, and brooms in their fields, jumping as high as they could to entice their crops to grow to that height. “Anyone observing the leaping broomstick dance of witches at the full moon,” says anthropologist Robin Skelton, “could be expected to think of flying.”

Another explanation is that the broomsticks and the potions that witches brewed in their cauldrons are linked, and the former was a tool for delivering the latter.

During the witch panics of the Middle Ages, authorities confiscated various brews, ointments, and salves from people accused of witchcraft and sorcery. In the early 1500s, physician Andres Laguna described one such substance that was taken from the home of an accused witch as “a pot full of [a] certain green ointment ... composed of soporific herbs such as hemlock, nightshade, henbane, and mandrake.”

The local constable was a friend of Laguna’s, so the doctor was able to obtain some of the ointment to experiment with. His first test subject was the executioner’s wife, whom he anointed “head to foot” with the green stuff.

“No sooner did I anoint her than she opened her eyes wide like a rabbit, and soon they looked like those of a cooked hare when she fell into such a profound sleep that I thought I should never be able to awake her,” Laguna wrote. “However ... after the lapse of thirty-six hours, I restored her to her senses and sanity.”

When the woman was conscious again, she asked Laguna, “Why did you awaken me, badness to you, at such an inauspicious moment? Why I was surrounded by all the delights in the world.” She then turned to her husband and claimed that she had cuckolded him and taken a “younger and lustier lover.”

Laguna wrote that even long after her dream, the executioner’s wife “stuck to many of her crazy notions.”

“From all this we may infer that all that those wretched witches do and say is caused by potions and ointments which so corrupt their memory and imagination that they create their own woes, for they firmly believe when awake all that they had dreamed when asleep,” he said.

Another 16th century physician, Giovanni Della Porta, described a similar case where he witnessed a suspected witch apply one of her ointments. She also fell into a “most sound and heavy sleep,” and when she awoke “began to speak many vain and doting words, affirming that she had passed over both seas and mountains.”

He reached a similar conclusion as Laguna: These potions were the source of the bizarre things that witches claimed to experience and partake in. After applying their ointments, Della Porta wrote, these women “seem to be carried in the air, to feasting, singing, dancing, kissing, culling, and other acts of venery, with such youths as they love and desire most: for the force of their imagination is so vehement, that almost all that part of the brain, wherein the memory consists, is full of such concepts.”

In the centuries since, scientists have confirmed the two doctors’ suspicions. There was no black magic at work in witches’ brews, just chemistry, and "the events of the Sabbat … were an imaginative fiction exacerbated by malnutrition and by the use of hallucinogenic concoctions.”

Many of the botanical ingredients included in witches' potions, says pharmacologist David Kroll, including nightshade, henbane, mandrake and jimsonweed, contain hallucinogenic chemicals called tropane alkaloids. These chemicals can cause vivid dreams and the sensation of flight, not unlike those reported by Della Porta’s witch and others accused of witchcraft. In his own experiments with henbane, toxicologist Gustav Schenk reported feeling “an intoxicating sensation of flying ... I soared where my hallucinations—the clouds, the lowering sky, herds of beasts, falling leaves which were quite unlike any ordinary leaves, billowing streamers of steam and rivers of molten metal—were swirling along.”

Clearly these chemicals are potent, but they can also be dangerous. Ingesting them by drinking a witch’s brew could lead to side effects ranging from mere intestinal discomfort to death. Jimsonweed poisoning, for example, sometimes left its victims “hot as a hare, blind as a bat, dry as a bone, red as a beet and mad as a wet hen.”

To get around the risks of taking these potions orally, somewhere some clever witch figured out an alternate way for getting them inside the body: a staff, stick or a tool they already had around the house—the broom.

The hallucinogens in the brews, it turns out, can be absorbed through the skin without any of the unpleasant side affects. Some of the best places for absorption are the sweat glands in the armpits and the mucus membranes around the rectum and female genitalia. To apply the potions to these places, witches would slather them on their brooms and “ride” them to their witchy gatherings.

Antoine Rose, accused of witchcraft in France, confessed as much to the authorities. She claimed that the Devil had given her a stick and a pot of ointment, and that to apply it, she would “smear the ointment on the stick, put it between her legs and say ‘Go, in the name of the Devil, go!’”

Other confessions and investigations turned up the same technique. In the 1300s, authorities searching the home of suspected witch Alice Kyteler “found a pipe of ointment wherewith she greased a staffe, upon which she ambled and galloped through thick and thin.” A century later, theologian Jordanes de Bergamo noted that “the witches confess that on certain days or nights they anoint a staff and ride on it to the appointed place or anoint themselves under the arms and in other hairy places.”

In some cases, the accused specifically mentioned a broomstick as their tool of choice. In 1453, Guillaume Edelin, accused of witchcraft in France, admitted to flying on a broomstick, and later a man confessed to seeing his “aged mother straddle a broomstick and whisk up the chimney and out of the house.”

So folks were using brooms covered with hallucinogenic concoctions to produce vivid dreams that involved traveling through the air and partaking in wild sex and other rites. Add some rumor and fear mongering and twist it around a little bit, and it’s easy to see how people got the idea that witches were literally flying on their broomsticks, aided by magic ointments, to their black masses.

To be fair, we have to take some of this with a grain of salt, given where the information is originally coming from. On the one hand, you have the church and government authorities and their citizen observers, who were often motivated by paranoia and social pressure to find and root witches out. As anthropologist Homayun Sidky notes, some historians dismiss the involvement of drugs in the practices of witches and argue that any witches’ potions, magic or not, were made up by the authorities to paint the targets of their persecution as more sinister. And on the other hand, you have the accused witches, who often gave their testimony and confessions under duress or torture. Still, it’s an interesting idea, and makes you look at the typical witch costume in a different light.