In 1073 the monk Hildebrand was appointed as pope Gregory VII, not by the cardinals, but by acclamation of the Roman people, disregarding all valid rules.
He was a passionate advocate of ecclesiastical reforms that ultimately aimed at a tightly organized church freed from all influence and control by secular rulers.
Thus the pope was to stand as representative of God as last judicial instance also over kings and the emperor.
The hardest decision was made by the German Empire. For since Otto the Great the Bishops here were also powerful imperial princes and pillars of the royal rule, on whose election the king had to exert influence if he did not want to renounce a substantial part of his power.
Thus the German King Henry IV disregarded the papal prohibition and continued to take the right to appoint Bishops dependent on him. He responded disproportionately to the threat of the church ban, completely overestimating his power, and demanded Gregory’s abdication.
Gregory VII then reacted with Henry’s excommunication, dissolving all oaths of allegiance which bound the subjects to the king and forbidding anyone to serve Henry.
A number of German princes seized the opportunity to weaken the king’s power and threatened to elect a counter-king if Heinrich was not released from his ban within the then usual period of one year and one day.
So Henry was forced to move to Italy. However, the southern dukes blocked the Alpine crossings controlled by them, so that he had to take the long and dangerous detour via Burgundy and Mont Cenis.
The strenuous Alpine crossing was described by his historian Lampert von Hersfeld: “They soon crawled forwards on their hands and feet, soon they leaned on the shoulders of their leaders; sometimes even when their foot slipped on the smooth ground, they fell down and slid down quite a bit; finally they arrived on the plain under great danger to their lives. The queen and the other women of her retinue put them on cattle skins, and dragged them down upon them.”
Henry and Gregory finally met at Canossa Castle.
“Here, after the robes of the king had been taken off, he stood barefoot and sober, from morning till evening, without any insignia of royal dignity, without displaying the slightest splendour … He behaved like this on the second day, like this on the third. Finally, on the fourth day, he was admitted to Gregory, and after many speeches and counter-talks he was finally absolved of his ban.”
This perseverance of several days in a penitential shirt (January 25-28, 1077) was, by the way, an usual penitential act in the Middle Ages, which was strictly formalized.
In any case, Heinrich IV was able to save his royalty by lifting the ban and was to become Roman-German emperor in 1084.
One sees thus, he had reached all his goals by the “Penance Walk to Canossa”.