History Of The Church, Volume 2
p. 503
pudiated Bertha, his lawful wife, and was then unlawfully cohabiting with Bertrada—was marked with greater leniency than in the case of Henry, it was because a statesman as prudent as Gregory knew well how to adapt his policy to the circumstances in which he was placed, and did not care to be engaged at one time in a contest with all the princes of Christendom. When, however, there was a real call upon him to speak out, he was prompt and decisive, as in the instance of Boleslaus, King of Poland.
The event proved the Pontiff had but too much reason for his misgivings of Henry's sincerity. Seduced by the flatteries and promises of the Lombard barons and some of the Italian bishops, the German king disregarded the obligations of his oath. The German princes being naturally irritated at this faithlessness, assembled (March 15, A. D. 1077) at Forchheim, near Bamberg, and, in spite of the remonstrance of Gregory, elected Rudolph, Duke of Suabia, king in Henry's place.
Siegfried, Archbishop of Mentz, who had deserted the cause of Henry and was then engaged in a vain effort to collect the tithes in Thuringia, crowned the newly elected King, after exacting from him a promise to guarantee the free election of bishops, and to recognize Germany as an elective monarchy. The last clause excluded Rudolph's son from the right of succession. By this act the princes pronounced definitively the decision, which, but a short time before, they had reserved to the Pope.
Henry, after hastily arranging matters in Italy, returned to Germany, and was shortly surrounded by all his former adherents; while Rudolph, on the contrary, was shamefully deserted by the very persons who had been most prominent in having him elected. Gregory maintained an attitude of neutrality toward both competitors for the crown. It was his desire to decide between them in conjunction with the spiritual and temporal princes of Germany, and, as both parties counted on his support, they mutually agreed to guarantee him a safe-conduct coming to and returning from Germany
Vita S. Stanisl., in Bandtkie, ed. chronic. Marttnt Gall., p. 319-380.