More than one thousand years of magical realism preceded One Hundred Years of Solitude, Ted Gioia reminds us:
My choice for the first magical realism novel dates back to the second century AD, and came from the hand of a North African author. Around the year 125, Lucius Apuleius was born in Madaurus (now M’Daourouch in present-day Algeria), a Roman colony famous as a center of learning. St. Augustine studied there, and later complained about the pagan tendencies of the local populace, as did the Roman grammarian Nonius Marcellus.
Apuleius, however, was much more than a product of local influences. He was widely traveled and well educated: he first studied at Carthage, before immersing himself in Platonist philosophy in Athens, and later learned Latin during a stay in Rome. He adopted a colorful style of that language for his most famous work, The Golden Ass, which is the only ancient Latin novel to have survived in a complete form.
Apuleius was well equipped to incorporate elements of magic into his storytelling — he was once accused of practicing magic, and his courtroom defense has survived. This document, known as A Discourse on Magic, is more admired for its wit than as a source of information on wizardry; but it does give Apuleius an edge over Kafka or Márquez and the other illustrious modernists who could never convince anyone they were actual sorcerers! Apuleius also brought other valuable first-hand experiences to bear on his writing, not just his extensive travels and broad-based education, but also his participation in the ancient mystery cults. The latter appear in the plot of The Golden Ass, when the hero Lucius is initiated into the cult of Isis.