In January of 1077, Holy Roman Emperor Henry IV found himself in a precarious position: after crossing the Alps, he was barefoot and dressed in rags outside Pope Gregory VII’s temporary residence in Canossa, Northern Italy.
The year prior, Henry IV had been excommunicated for sending “clergy” he had appointed himself to Gregory VII to call him a “false monk” – and for being at odds with Gregory favorite King Rudolf of Germany.
To test the king’s sincerity, Gregory had him wait outside for three days and nights in the cold and unforgiving elements before forgiving him and ending his excommunication.
All was not well though, and soon after Henry and Rudolf started warring again. When Henry asked Gregory to excommunicate Rudolf, the pope was more inclined to do so to him and instead re-excommunicated Henry.
This started the Great Saxon Revolt, the death of Rudolf in October 1080, and the eventual occupation of Rome in 1083 by Henry VII.
When Henry VII captured the part of Rome including the papal residence in Saint Peter’s Basilica, he had Gregory imprisoned.
Gregory called his Norman friends who drove Henry VII out of Rome, but also sacked the city, making Gregory a very unpopular man.
He died, in exile, on the 25th of May in 1085.