John XII, c.937–964, pope (955–64), a Roman (count of Tusculum) named Octavian; successor of Agapetus II and predecessor of either Leo VIII or Benedict V. His father, Alberic, secured John's election before the latter was 20 years old. John's life was notoriously immoral and his pontificate a disgrace. He called on Otto I to help him against Berengar II of Italy. John crowned (962) Otto the first German emperor, and the two, in the famous Privilegium Ottonis, pledged loyalty to each other. Disliking the emperor's new influence in papal affairs, John sided with Berengar's party against Otto. In retaliation, Otto invaded Rome and called a synod that deposed John and elected Leo VIII as pope. John was restored by Roman insurrectionists shortly before he was mysteriously murdered. Scholars differ on the legitimacy of Leo VIII's reign, as they do on the brief pontificate of Benedict V, elected upon John's death and deposed by Otto shortly thereafter, again in favor of Leo. Leo died in 965.