coronation. The truth is, as I mentioned in that post, that Pope Leo who did the crowning on 25 December really owed Charlemagne for quite a lot—including probably the fact that he was still on the Throne of Peter, and alive.
He became Pope Leo III very quickly after his predecessor's death; in fact, he was elected the same day Pope Adrian I (c.700 - 25 December 795) was buried. Presumably, the haste was because the Romans wanted to get their man in the position before the word got out to the Franks who might have had their own choice in mind.
Leo tried to get ahead of any opposition by immediately writing to Charlemagne, including tokens of respect and requesting diplomatic representatives, and placing Charlemagne in the position of the Pope's defender. Charlemagne considered himself a great friend to the Church as well as a great proponent of education, and responded favorably to what amounted to flattery. Charlemagne sent gifts to Leo, delivered by one of his favorite Carolingian ambassadors, Abbot Angilbert, along with a contingent of soldiers.
These soldiers were very important a little later. Leo had enemies among the Romans, who spread terrible rumors about his life of sin (he was accused of adultery and perjury). In April of 799 he was attacked and beaten severely. He escaped to St. Peter's, and was thereafter escorted by Charlemagne's men to preserve his safety, going to Paderborn in northern Germany to be received by Charlemagne.
Charlemagne's men escorted the pope back to Rome, and Charlemagne himself went there in November of 800, arbitrating a council with Leo and his adversaries on 1 December 800. Leo took an oath of purgation (the Middle Ages held great stock in the accused or his friends proclaiming his trustworthiness); Charlemagne found in Leo's favor, and his adversaries were exiled.
A few weeks later, Charlemagne, while attending mass on Christmas Day, had the crown of the Holy Roman Emperors placed on his head by Pope Leo. Supposedly, this was a surprise to Charlemagne, but does anyone think this had not been discussed while Leo and the king met in Paderborn?