Hugh became king of France, ending the Carolingian line of kings in 987. Adalberon died on 23 January 989. Gerbert was a natural candidate for his succession, but King Hugh appointed Arnulf, an illegitimate son of King Lothair, instead. Arnulf was deposed in 991 for alleged treason against Hugh, and Gerbert was elected his successor. There was so much opposition to Gerbert's elevation to the See of Rheims, however, that Pope John XV (985–996) sent a legate to France who temporarily suspended Gerbert from his episcopal office. Gerbert sought to show that this decree was unlawful, but a further synod in 995 declared Arnulf's deposition invalid. Gerbert then became the teacher of Otto III, and Pope Gregory V (996–999), Otto III's cousin, appointed him archbishop of Ravenna in 998. With imperial support, Gerbert was elected to succeed Gregory V as pope in 999. Gerbert took the name of Sylvester II, alluding to Sylvester I (314–335), the advisor to Emperor Constantine I (324–337). Soon after he became pope, Sylvester II confirmed the position of his former rival Arnulf as archbishop of Rheims. As pope, he took energetic measures against the widespread practices of simony and concubinage among the clergy, maintaining that only capable men of spotless lives should be allowed to become bishops. In 1001, the Roman populace revolted, forcing Otto III and Sylvester II to flee to Ravenna. Otto III led two unsuccessful expeditions to regain control of the city and died on a third expedition in 1002. Sylvester II returned to Rome soon after the emperor's death, although the rebellious nobility remained in power, and died a little later. Sylvester is buried in St. John Lateran. Legacy Gerbert of Aurillac was a humanist long before the Renaissance. He read Virgil, Cicero and Boethius; he studied Latin translations of Porphyry and Aristotle. He had a very accurate classification of the different disciplines of philosophy. He was the first French pope. Gerbert was said to be one of the most noted scientists of his time. Gerbert wrote a series of works dealing with matters of the quadrivium (arithmetic, geometry, astronomy, music), which he taught using the basis of the trivium (grammar, logic, and rhetoric). In Rheims, he constructed a hydraulic-powered organ with brass pipes that excelled all previously known instruments, where the air had to be pumped manually. In a letter of 984, Gerbert asks Lupitus of Barcelona for a book