The Carolingian Empire (800–887) was a Frankish-dominated empire in Western and Central Europe during the Early Middle Ages. It was ruled by the Carolingian dynasty, which had ruled as kings of the Franks since 751 and as kings of the Lombards in Italy from 774. In 800 Pope Leo III crowned King Charlemagne as Roman emperor in return for political protection, disregarding the universalist claims of the weakened Byzantine Empire. The Carolingian Empire is sometimes considered the first phase in the history of the Holy Roman Empire.
After a civil war from 840 to 843 following the death of Emperor Louis the Pious, the empire was divided into autonomous kingdoms, with one king still recognised as emperor but with little authority outside his own kingdom. The unity of the empire and the hereditary right of the Carolingians continued to be acknowledged. In 884 Charles the Fat reunited all the Carolingian kingdoms for the last time, but he was deposed by the Frankish nobility in 887 and died in 888, and the empire immediately fractured. With the only remaining legitimate male of the dynasty a child, the nobility elected regional kings from outside the dynasty or, in the case of the eastern kingdom, an illegitimate Carolingian. The illegitimate line continued to rule in the east until 911, while in the western kingdom the legitimate Carolingian dynasty was restored in 898 and ruled until 987 with an interruption from 922 to 936.