The result was very different from that looked for by the volatile young ruler. The vigorous and daring pontiff at once placed Henry himself under interdict, releasing his subjects from their oath of allegiance, and declaring him deprived of the imperial dignity. The scorn with which the emperor heard of this decree was soon changed to terror when he perceived its effect upon his people. The days were not yet come in which the voice of the pope could be disregarded. With the exception of the people of the cities and the free peasantry, who were opposed to the papal dominion, all the subjects of the empire deserted Henry, avoiding him as though he were infected with the plague. The Saxons flew to arms; the foreign garrisons were expelled; the imprisoned princes were released; all the enemies whom Henry had made rose against him; and in a diet, held at Oppenheim, the emperor was declared deposed while the interdict continued, and the pope was invited to visit Augsburg; in order to settle the affairs of Germany. The election of a successor to Henry was even proposed, and, to prevent him from communicating with the pope, his enemies passed a decree that he should remain in close residence at Spires.

The situation of the recently great monarch had suddenly become desperate. Never had a decree of excommunication against a crowned ruler been so completely effective. The frightened emperor saw but one hope left, to escape to Italy before the princes could prevent him, and obtain release from the interdict at any cost, and with whatever humiliation it might involve. With this end in view he at once took to flight, accompanied by Bertha, his infant son, and a single knight, and made his way with all haste towards the Alps.

The winter was one of the coldest that Germany had ever known, the Rhine remaining frozen from St. Martin's day of 1076 to April, 1077. About Christmas of this severe winter the fugitives reached the snow-covered Alps, having so far escaped the agents of their enemies, and crossed the mountains by the St. Bernard pass, the difficulty of the journey being so great that the empress had to be slid down the precipitous paths by ropes in the hands of guides, she being wrapped in an ox-hide for protection.

Italy was at length reached, after the greatest dangers and hardships had been surmounted. Here Henry, much to his surprise, found prevailing a very different spirit from that which he had left behind him. The nobles, who cordially hated Gregory, and the bishops, many of whom were under interdict, hailed his coming with joy, with the belief "that the emperor was coming to humiliate the haughty pope by the power of the sword." He might soon have had an army at his back, but that he was too thoroughly downcast to think of anything but conciliation, and to the disgust of the Italians insisted on humiliating himself before the powerful pontiff.

Gregory was little less alarmed than the emperor on learning of Henry's sudden arrival in Italy. He was then on his way to Augsburg, and, in doubt as to the intentions of his enemy, took hasty refuge in the castle of Canossa, then held by the Countess Matilda, recently a widow, and the most powerful and influential princess in Italy.

But the alarmed pope was astonished and gratified when he learned that the emperor, instead of intending an armed assault upon him, had applied to the Countess Matilda, asking her to intercede in his behalf with the pontiff. Gregory's acute mind quickly perceived the position in which Henry stood, and, with great severity, he at first refused to speak of a reconciliation, but referred all to the diet; then, on renewed entreaties, he consented to receive Henry at Canossa, if he would come alone, and as a penitent. The castle was surrounded with three walls, within the second of which Henry was admitted, his attendants being left without. He had laid aside every badge of royalty, being clothed in penitential dress and barefoot, and fasting and praying from morning to evening. For a second and even a third day was he thus kept, and not until the fourth day, moved at length by the solicitations of Matilda and those about him, did Gregory grant permission for Henry to enter his presence. An interview now took place, in which the pope consented to release the penitent emperor from the interdict. One of the conditions of this release was he should leave to Gregory the settlement of affairs in Germany, and to give up all exercise of his imperial power until he should be granted permission to exercise it again.

This agreement was followed by a solemn mass, after which Gregory spoke to the following effect: As regarded the crimes of which Henry had accused him, he could easily bring evidence in disproof of the charges made, but he would invoke the judgment of God alone. "May the body of Jesus Christ, which I am about to receive," he said, "be the witness of my innocence. I beseech the Almighty thus to dispel all suspicions, if I am innocent; to strike me dead on the spot, if guilty."

He then received one-half the Sacred Host, and turning to the king, offered him the remaining half, bidding him to follow his example, if he held himself to be guiltless. Henry refused the ordeal, doubtless because he did not dare to risk the penalty, and was glad enough to escape from the presence of the pope, a humble penitent.

This ended Henry's career of humiliation. It was followed by a period of triumph. On leaving the castle of Canossa he found the people of Lombardy so indignant at his cowardice, that their scorn induced him to break the oath he had just taken, gather an army, and assail the castle, in which he shut up the pope so closely that he could neither proceed to Augsburg nor return to Rome.

This siege, however, was not of long continuance. Henry soon found himself recalled to Germany, where his enemies had elected Rudolf, Duke of Swabia, emperor in his stead. A war broke out, which continued for several years, at the end of which Gregory, encouraged by a temporary success of Rudolf's party, pronounced in his favor, invested him with the empire as a fief of the papacy, and once more excommunicated Henry. It proved a false move. Henry had now learned his own power, and ceased to fear the pope. He had strong support in the cities and among the clergy, whom Gregory's severity had offended, and immediately convoked a council, by which the pope was again deposed, and the Archbishop of Ravenna elected in his stead, under the title of Clement III.