The Carolingian Empire (800–888) 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, the Frankish king Charlemagne was crowned emperor in Rome by Pope Leo III in an effort to transfer the Roman Empire from the Byzantine Empire to Western Europe. The Carolingian Empire is considered the first phase in the history of the Holy Roman Empire.
After a civil war (840–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 died in 888 and the empire immediately split up. 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.
The population of the empire was roughly between 10 and 20 million people. Its heartland was Francia, the land between the Loire and the Rhine, where the realm's primary royal residence, Aachen, was located. In the south it crossed the Pyrenees and bordered the Emirate of Córdoba and, after 824, the Kingdom of Pamplona; to the north it bordered the kingdom of the Danes; to the west it had a short land border with Brittany, which was later reduced to a tributary; and to the east it had a long border with the Slavs and the Avars, who were eventually defeated and their land incorporated into the empire.