The Kingdom of Italy (Latin: Regnum Italiae or Regnum Italicum, Italian: Regno d'Italia) was one of the constituent kingdoms of the Holy Roman Empire, along with the kingdoms of Germany, Bohemia, and Burgundy. It comprised northern and central Italy, but excluded the Republic of Venice. Its original capital was Pavia until the 11th century.
In 773, Charlemagne, the King of the Franks, crossed the Alps to invade the Kingdom of the Lombards, which encompassed all of Italy except the Duchy of Rome and some Byzantine possessions in the south. In June 774, the kingdom collapsed and the Franks became masters of northern Italy. The southern areas remained under Lombard control in the Duchy of Benevento. Charlemagne adopted the title "King of the Lombards" and in 800 was crowned "Emperor of the Romans" in Rome. Members of the Carolingian dynasty continued to rule Italy until the deposition of Charles the Fat in 887, after which they once briefly regained the throne in 894–96. Until 961, the rule of Italy was continually contested by several aristocratic families from both within and outside the kingdom.
In 961, King Otto I of Germany, already married to Adelaide, widow of a previous king of Italy, invaded the kingdom and had himself crowned in Pavia on 25 December. He continued on to Rome, where he had himself crowned emperor on 7 February 962. The union of the crowns of Italy and Germany with that of the so-called "Empire of the Romans" proved stable. To this union was Burgundy added in 1032, and by the twelfth century the term "Holy Roman Empire" had come into use to describe it. From 961 on, the Emperor of the Romans was usually also King of Italy and Germany, although emperors sometimes appointed their heirs to rule in Italy and occasionally the Italian bishops and noblemen elected a king of their own in opposition to that of Germany. The absenteeism of the Italian monarch led to the rapid disappearance of a central government in the High Middle Ages, but the idea that Italy was a kingdom within the Empire remained and emperors frequently sought to impose their will on the evolving Italian city-states. The resulting wars between Guelphs and Ghibellines, the anti-imperialist and imperialist factions, respectively, were characteristic of Italian politics in the 12th–14th centuries. The Lombard League was the most famous example of this situation; though not a declared separatist movement, it openly challenged the emperor's claim to power.