Henry took up the challenge. He invested the Bishop of Milan himself, after which Gregory VII threatened to excommunicate him. In 1076, Henry then called the Council of Worms, including nobles and German bishops, who deposed Gregory, thus trampling the Dictatus. Gregory in turn deposed and excommunicated Henry, and began earnest contacts with German rebels. Again, Saxons, Swabians, and Bavarians rose in revolt, declaring for the Pope. Defeated by these, Henry was told at the Tribure Council of 1076 that he had a year to obtain absolution before forced abdication. Thus, he would have to apologize to the Pope, but the German rebels conspired to prevent this by blocking the Alpine passes. The German king was able to outflank his rivals, and crossed the Alps to find Gregory at Canossa, just before Christmas 1076. Seeking absolution as a penitent sinner, he was able to force Gregory's forgiveness. German rebels felt betrayed by Gregory, and ceased support for him. Without consulting the pope, they elected Rudolph of Swabia as an anti-king. After three years of bitter civil war Henry emerged victorious in 1080. During the same period, William the Bastard of Britain and Philip II Augustus of France made it clear they would not refrain from investing bishops with their offices. Still, Gregory again excommunicated Henry in 1081, provoking a German assault on Rome in 1081. After three years of siege, German forces entered the city with their own pope. Gregory holed up in a nearby fortress, and called on his Normans for help. Hearing this and seeing Gregory powerless, German forces withdrew. When the Normans arrived to see no army facing them and Rome defenseless, they sacked and looted the city, then left for the south with Gregory as captive. Henry's pope ruled for the next four years, and Gregory looked like a failure, having overreached himself.
Gregory's conditional victory did emerge, however, during the next generation. Pope Urban II (1088-1099) abandoned claims to depose Emperors, but insisted upon the ban of lay investiture. He was able to return to Rome in 1097, and excommunicated Henry again. A cold war with the German monarch ensued, and the latter was never as strong as his powerful predecessors. He faced continual small revolts that prevented total authority in Germany. Indeed, his son Henry V, who succeeded him in 1106, had been fighting against him. During Pascal II's papal tenure (1099-1118), real strides were made to regularize Papal authority. In 1107, Henry I of England accepted that a bishop would first be canonically elected, after which homage to the king would complete consecration. Louis VI of France accepted a similar arrangement. As regards Germany, in 1111 Henry V occupied Rome to finish the matter. Pascal's solution was that clerics abandon feudal properties and worldly power, to put them beyond the king's levers of influence. Very few cardinals accepted this plan, and Henry carried Pascal away from Rome as a captive. A second suggestion, made under duress, that Henry could invest bishops with ring and staff, was also rejected by the cardinals. Finally, the 1122 Concordat of Worms between Henry V and Pope Calixtus was similar to the agreement in England, except that in Germany the king was allowed to be present at the election of bishops. While in the short term this condition meant that the king would be able to exercise determining influence, it is fair to say that this outcome of the Investiture Controversy marks the moment when the Papacy became an independent European institution. Popes became free of both Roman clans and German emperors, and in the long run the Pope would extend his power over all European bishops. The Church would be a free standing institution, paving the way for the thirteenth-century Papal Monarchy.