Pope Gregory VII disputed the right of Emperor Henry IV to invest bishops, and the ensuing Investiture Controversy redefined the medieval church.