The act by which a sovereign, in the Middle Ages, granted titles, possessions, and temporal rights to bishops, abbots, and other spiritual leaders. The ritual of investiture consisted in the delivery of the spiritual emblems, ring and crosier, and sometimes the keys of the church. This privilege of secular princes and lords dates from the time of Charlemagne. So long as these princes had the Church's welfare at heart, lay investiture was tolerated. But when ecclesiastical offices were bought and sold, and free elections of bishops hindered, the Church vigorously opposed it with anti-investiture legislation, which was sporadically enforced. Pope Gregory VII, upon becoming Pope, enacted stringent measures against investiture, even to excommunicating those who continued it. The Concordat of Worms in 1122 finally ended the strife between the emperors and the Holy See. Once the major concessions were made by the emperors, the Pope agreed that all elections would be held in the emperor's presence and his bestowal of the temporalities of the bestowed office would be continued. The conflict over lay investiture reached its peak in Germany.