Charles and his brother shared the kingdom for some time. Carloman then traveled to Rome and became a monk. Charles became the sole king. He then earned his name "Charles the Great" (Charlemagne) by defeating the Lombards, the Saxons, and the Avars. In 800 Charlemagne was crowned Holy Roman Emperor by Pope Leo III. The dynasty was passed down to his son, Louis the Pious and to his grandsons. By the time Louis inherited the kingdom the Carolingian Empire had already started to decline. By the end of the 9th century it came to an end. With the collapse of the empire the dynasty came to an end.