Hildebrand of Sovana was the son of a Tuscan blacksmith. Educated in Rome under his uncle, the abbot of St. Mary's on the Aventine, he became a Benedictine monk at Cluny (or at one of its dependencies) and rose to become the most influential cleric in Rome under five reforming popes — Leo IX, Victor II, Stephen IX, Nicholas II, and Alexander II.
Elected pope in 1073 by acclamation while at a funeral Mass, he took the name Gregory after Gregory the Great. The twelve-year pontificate that followed remade the papacy. The Dictatus Papae (1075) — twenty-seven terse propositions — asserted that the Roman Pontiff alone may depose bishops; that the pope's name alone is to be recited in church; that he may depose emperors; that he is judged by no one. The Investiture Controversy with Henry IV of Germany followed at once.
In January 1077, after Gregory had excommunicated him, Henry IV crossed the Alps in winter and stood for three days in the snow outside the castle of Canossa, where Gregory was guest of Countess Matilda of Tuscany, begging absolution as a penitent. Gregory, bound by the duty of a confessor, absolved him. Within three years Henry had renounced the absolution, named an antipope, marched on Rome, and besieged Gregory in the Castel Sant'Angelo. The Normans of Robert Guiscard liberated Gregory in 1084 — and then so brutally sacked Rome that the Romans turned on the pope they blamed for the calamity. Gregory withdrew with the Normans to Salerno, where he died in 1085. His last words, echoing Psalm 45: 'I have loved justice and hated iniquity; therefore I die in exile.'

