The legend of Gerbert grows from the work of the English monk William of Malmesbury in "De Rebus Gestis Regum Anglorum" and a polemical pamphlet, "Gesta Romanae Ecclesiae contra Hildebrandum", by Cardinal Beno, a partisan of Emperor Henry IV who opposed Pope Gregory VII in the Investiture Controversy. According to the legend, Gerbert, while studying mathematics and astrology in the Muslim cities of Córdoba and Seville, was accused of having learned sorcery. Gerbert was supposed to be in possession of a book of spells stolen from an Arab philosopher in Spain. Gerbert fled, pursued by the victim, who could trace the thief by the stars, but Gerbert was aware of the pursuit, and hid hanging from a wooden bridge, where, suspended between heaven and earth, he was invisible to the magician.