query: Who was the last leader of the Holy Roman Empire?
passage: Holy Roman Emperor
The Holy Roman Emperor was widely perceived to rule by divine right, though he often contradicted or rivaled the Pope, most notably during the Investiture controversy. In theory, the Holy Roman Emperor was primus inter pares (first among equals) among other Catholic monarchs. In practice, a Holy Roman Emperor was only as strong as his army and alliances, including marriage alliances, made him. There was never a Holy Roman Empress regnant, though women such as Theophanu and Maria Theresa of Austria served as de facto Empresses regnant. Throughout its history, the position was viewed as a defender of the Roman Catholic faith. Until the Reformation, the Emperor elect (imperator electus) was required to be crowned by the Pope before assuming the imperial title. Charles V, Holy Roman Emperor was the last to be crowned by the Pope in 1530. Even after the Reformation, the elected Emperor always was a Roman Catholic. There were short periods in history when the electoral college was dominated by Protestants, and the electors usually voted in their own political interest.
passage: Henry IV, Holy Roman Emperor
The Romans soon fell away from their allegiance to the pope. Recalled to the city, Henry entered Rome in March 1084, after which Gregory was declared deposed and Antipope Clement III was elected by the Romans. On 31 March 1084 Henry was crowned emperor by Clement and received the patrician authority. His next step was to attack the fortresses still in the hands of Gregory. The pope was saved by the advance of Robert Guiscard, duke of Apulia, who left the siege of Durazzo and marched towards Rome: Henry left the city and Gregory was freed. Gregory soon died at Salerno, in 1085, but not before a last letter in which he exhorted the whole of Christianity to a crusade against the Emperor.