As Charlemagne was nearing the end of his life, he was over seventy years old. So, according to Frankish custom he prepared to turn his kingdom over to his son. Two of Charlemagne's sons had died leaving only Louis to take over. In 813 CE, Charlemagne crowned his son, Louis, as Emperor. This was done without permission of the Pope who was furious but could do nothing.
Now Louis was a good man and a good son but not a very good emperor. Louis was deeply religious and spent his time in prayer. The other Nobles saw this and began doing things without the permission or even telling Louis what they were doing.
When Pope Leo died, a new pope was elected. This new pope was even less popular with the people then Pope Leo and once again the people rose up in revolt. The Pope asked Emperor Louis for help. Louis brought his army to Rome. When Louis knelt in front of the Pope, the Pope put a crown on him, and made him Holy Roman emperor, once again placing the church over the head of the empire. Unlike his father, Louis felt deeply honored to be able follow the directions of the Pope.
When Louis died, as was custom, his kingdom was divided between his sons. This was the end of the Frankish Empire. The sons fought each other and fought other nobles for control, sending Europe back into the chaos that Charlemagne had brought Europe out of.