The Holy Roman Empire, also known as the First Reich, was a Confederation of European States that existed for approximately a millennium. It emerged from the encounter between Charlemagne and Pope Leo III in the year 800, consolidating with Charlemagne's coronation as emperor. The title passed to the Carolingian dynasty and, after civil wars, to the German emperors from 962 onwards. Frederick Barbarossa introduced the term "holy" in 1157. In 1512, Maximilian I used the title "Holy Roman Empire of the German Nation." In theory, the emperor had authority over all Christian kingdoms, being second only to the pope. Since the reign of Otto I, the empire ruled over Germany, the Alps, and parts of Italy. In 1806, with the Treaty of Pressburg, the Holy Roman Empire was formally dissolved.