19. Octavian became Prince of Rome when his father died, and shortly afterwards was elected Pope John XII aged just 18
On his deathbed, Alberic II’s mind turned to the issue of his succession. He named his younger son, Octavian, his heir as Prince of Rome, which must have been exciting enough for the teenager. But Alberic’s brother, John, had been Pope John XI (before Alberic imprisoned him), and this gave the prince an idea: that office would suit Octavian, who had hitherto shown absolutely no interest in religion, just swell! To keep all the city’s power within his family, Alberic forced the leading Roman families and even the current Pope, Agapitus II, to swear they would honour his last wish.
The Pope is the head of the Catholic Church, infallible, and answerable only to God. The office is thus carefully protected and couched in traditions. Alberic’s final wish violated the Decree of Symmachus from 499, which forbade agreements about a Pope’s successor in the current incumbent’s lifetime, but Agapitus’s own health was too weak to let him make even a squeak of disgruntlement. Octavian certainly wasn’t going to quibble about his new job, and so he first became Prince of Rome and then Pope a few months later upon Agapitus’s death, changing his name to John for some reason.