the pope recognized henry v as the lawful emperor was the impact of the concordat of worms
The Concordat of Worms (Latin: Concordatum Wormatiense), sometimes called the Pactum Calixtinum by papal historians, was an agreement between Pope Callixtus II and Henry V, Holy Roman Emperor on September 23, 1122, near the city of Worms.