Early modern period
In the early modern period, the Holy Roman Empire was a union of territories in Central Europe under a Holy Roman Emperor the first of which was Otto I. The last was Francis II, who abdicated and dissolved the Empire in 1806 during the Napoleonic Wars. Despite its name, for much of its history the Empire did not include Rome within its borders.
History of Rome
In 480, the last Western Roman emperor, Julius Nepos, was murdered and a Roman general of barbarian origin, Odoacer, declared allegiance to Eastern Roman emperor Zeno. Despite owing nominal allegiance to Constantinople, Odoacer and later the Ostrogoths continued, like the last emperors, to rule Italy as a virtually independent realm from Ravenna. Meanwhile, the Senate, even though long since stripped of wider powers, continued to administer Rome itself, with the Pope usually coming from a senatorial family. This situation continued until Theodahad murdered Amalasuntha, a pro-imperial Gothic queen, and usurped the power in 535. The Eastern Roman emperor, Justinian I (reigned 527–565), used this as a pretext to send forces to Italy under his famed general Belisarius, recapturing the city next year. The Byzantines successfully defended the city in a year-long siege, and eventually took Ravenna.