Pan Twardowski (Polish pronunciation: [ˈpan tfarˈdɔfski]), in Polish folklore and literature, is a faustian sorcerer who entered a pact with the Devil. Like Faust, Pan Twardowski sold his soul in exchange for special powers – such as summoning up the spirit of Polish King Sigismund Augustus' deceased wife – but unlike Goethe's figure, he eventually met a tragic fate. The tale of Pan Twardowski exists in various diverging versions and forms the basis for many works of fiction, including one by Adam Mickiewicz.
According to an old legend, Twardowski was a nobleman (szlachcic) who lived in Kraków in the 16th century. He sold his soul to the devil in exchange for great knowledge and magical powers. However, Twardowski wanted to outwit the devil by including a special clause in the contract, stating that the devil could only take Twardowski's soul to Hell during his visit to Rome – a place the sorcerer never intended to go. Other variants of the story have Twardowski being sold to the devil as a child by his father.
With the devil's aid, Twardowski quickly rose to wealth and fame, eventually becoming a courtier of King Sigismund Augustus, who sought consolation in magic and astrology after the death of his beloved wife, Barbara Radziwiłł. He was said to have summoned the ghost of the late queen to comfort the grieving king, using a magic mirror. The sorcerer also wrote two books, both dictated to him by the devil – a book on magic and an encyclopedia.