Magic as controlling phenomena and living beings were intertwined with medicine and religion. In many cultures, sacred rituals were a combination of medicine, religion and magic. Particular types of plants played a unique role here, in specific Solanaceae.
Rural "wise women" and their lore of magical and medicinal plants were a significant part of this issue. After all, it is they who are progenitors of those called witches.
How medieval hags obtained a hallucinogenic state of mind where they cast spells and performed incantations? The secret was psychoactive tropane alkaloids contained in plants like Henbane - stinking nightshade, Thorn Apple, also known as Jimsonweed or Belladona - deadly nightshade. Some recipes called for the use of less dangerous but still useful plants such as mugwort, poppy and cannabis, among others. There was finally Mandrake, the human-shaped plant has long been associate with magic.
In the medieval period, preparations with hallucinogenic herbs were part of folk remedies. Witches' Ointment was known to cause delirious sensations, hallucinations and effect of deep slumber.
Church demonized these practices creating the "witch" stereotype and what history has called the "witches' ointment" and transformed folk drug practices into diabolic experiences. It should be mentioned that they often referred to magical things such as transformations into other creatures and flying. The hallucinogenic effect of plants was perceived as magical.
"A characteristic feature of Solanaceae psychosis is furthermore that the intoxicated person imagines himself to have been changed into some animal, and the hallucinosis is completed by the sensation of the growth of feathers and hair" Erich Hesse claimed in 1946.
Some sources state that "witches' ointment" was known already in the fifteenth century and was used to fall into a trance. But there have been many psychogenic formulas for hundreds of years and their application varied - from spirit travel to love potions.
It is remarkable how the psychedelic experience was deeply insinuated into the beliefs and practices of in its ritual and magical aspects.