Rabbi Joseph Karo authored the Shulhan Arukh (The Laid Table). He claimed that it was “dictated by a divine messenger, a magid, whom he regarded as a manifestation of the shekhinah.”
Incredibly, Dan comments that “…Safed scholars went as far as inflicting themselves with pain and wounds, including self-immolation, which is very rare in Jewish practice.”
“Isaac Luria, who revolutionized the kabbalah in this period, arrived in Safed in 1570 when these practices were at their peak.” Luria was born in Safed in 1534, but migrated to Egypt and then later returned. Luria died because of the plague two years later, in 1572, at the age of 38. The most important of Luria’s teachings were published by Gershom Scholem and Isaiah Tishby in 1941.
–Joseph Dan, Kabbalah: A Very Short Introduction, pg.73.