The correct answer is the Catholic church
According to the Catholic church, Charlemagne had the divine right to rule as his rule was deemed to be appointed by God himself and he was the ruler and protector of all Christian people. As such, he ruled the country in the name of God and he was his responsibility as such to promote Christianity and god's will in his rule.