Henry IV was Holy Roman Emperor from 1084 to 1105, King of Germany from 1054 to 1105, King of Italy and Burgundy from 1056 to 1105, and Duke of Bavaria from 1052 to 1054. He was the son of Henry III, Holy Roman Emperor—the second monarch of the Salian dynasty—and Agnes of Poitou. After his father's death on 5 October 1056, Henry was placed under his mother's guardianship. She made grants to German aristocrats to secure their support. Unlike her late husband, she could not control the election of the popes, thus the idea of the "liberty of the Church" strengthened during her rule. Taking advantage of her weakness, Archbishop Anno II of Cologne kidnapped Henry in April 1062. He administered Germany until Henry came of age in 1065.
Henry endeavoured to recover the royal estates that had been lost during his minority. He employed low-ranking officials to carry out his new policies, causing discontent in Saxony and Thuringia. Henry crushed a riot in Saxony in 1069 and overcame the rebellion of the Saxon aristocrat Otto of Nordheim in 1071. The appointment of commoners to high office offended German aristocrats, and many of them withdrew from Henry's court.