Lamberto came from a simple rural background at Fiagnano Castle, near Imola in present day Italy. In the 12th century, such a successful career from humble beginnings is a mark of outstanding abilities. His learning recommended him to Pope Paschal II (1099–1118), who called him to Rome. Elected Cardinal Priest of the Titulus S. Praxedis in 1099, Lamberto was one of the cardinals who accompanied Pope Gelasius II in exile in 1118–1119. As a tested opponent of the Emperor's right to select bishops in his territories – the Investiture Controversy – Lamberto was a natural choice for papal legate; he was sent in 1119 to deal with Henry V, Holy Roman Emperor (1105–25), and delegated with powers to come to an understanding concerning the right of investiture. The struggle came to a conclusion with the Concordat of Worms (1122), the "Pactum Calixtinum" that was almost as much a Pactum Lamberti was effected on September 23, 1123.