Hildebrand had been the driving figure behind papal policy for two decades before he was acclaimed pope in 1073, and the reform he pursued had three targets: simony, the buying and selling of church office; clerical marriage; and the appointment of bishops and abbots by laymen.
The third was the one that could not be settled quietly, because it was not a corruption but the constitution of the empire. German bishops held vast lands and were royal officers; an emperor who could not choose them could not govern. In 1075 a memorandum was entered in Gregory's register, the Dictatus Papae, twenty seven bald propositions: that the Roman church was founded by God alone, that the pope alone may depose bishops, that he may depose emperors, that he may be judged by no one, that a rightly ordained Roman pontiff is undoubtedly made holy by the merits of St Peter. Whether it was a working index to a canonical collection or a programme is argued; its content is not in doubt.
He forbade lay investiture the same year. Henry IV, then twenty five, responded by having his bishops declare Gregory deposed, addressing him as no pope but a false monk. Gregory excommunicated and deposed him in turn, and released his subjects from their oaths, which was the decisive act: the German princes, who had their own reasons, announced that if the ban were not lifted within a year they would elect another king.