After the fall of the Western Roman Empire in 475 A.D., the Lombard tribe in northern Italy frequently encroached on lands held by the pope. In 753–54 Pope Stephen II traveled to Germany to appeal for help from Pepin the Short, king of the Franks. Pepin subdued the Lombards and declared the pope ruler of all church property holdings in Italy.

The Lombards, however, continued to be a threat to the popes. Pepin's son, Charlemagne, made a number of expeditions to Italy to protect papal interests. In 800, in Rome, Pope Leo III crowned Charlemagne Roman emperor. This event is often considered the origin of the Holy Roman Empire. However, Charlemagne's empire was divided among three of his grandsons by the Treaty of Verdun (843) and soon broke into numerous feudal states that resisted the authority of the monarchs. Charlemagne's descendants enjoyed the honorary title of emperor, but had little or no empire to go with it.

In Italy, meanwhile, Roman nobles had usurped the political authority of the papacy. In 954 Pope John XII appealed to the German king, Otto (I) the Great, for aid. Otto invaded Italy in 962 and was crowned Roman emperor by the pope. (The word “Holy” was added in the 12th century.)

For the next 850 years the title of (Holy) Roman emperor was held by German sovereigns. The empire consisted of Germany and, at first, of northern Italy as far south as Rome. During one period it included the Kingdom of the Two Sicilies. The Italians, however, fiercely resented German rule and revolted frequently. After the middle of the 13th century, Germany made little effort to govern Italy.

Holy Roman Empire in 1250.Holy Roman Empire in 1250. This map shows the territory of the Holy Roman Empire in 1250. The empire extended from the North Sea to the Mediterranean Sea and from Eastern France to Poland. The Kingdom of the Two Sicilies, a personal possession of the emperor, was geographically separated from the empire by the Papal States.

In 1356 Charles IV issued the Golden Bull, which formally established the principle of an elective monarchy for the empire. This document specified that the emperor be elected by the archbishops of Mainz, Trier, and Cologne, and the rulers of Saxony, Bohemia, Brandenburg, and the Palatinate.

After the Reformation and the Thirty Years' War (1618–48) the German states were sharply divided by religious and political differences and the influence of the emperor declined. In the 18th century the French writer Voltaire remarked that the Holy Roman Empire was “neither holy, nor Roman, nor an empire.” The emperor ruled Austria and was still king of Hungary, but elsewhere his title had more shadow than substance. In 1806 Napoleon I forced the dissolution of the empire, its ruler becoming merely the emperor of Austria.