In 1165 Pope Alexander III returned to Rome from exile, but it did not last long. He went back into exile in 1166 when the Emperor returned to Rome.
Before becoming Pope Alexander III, Rolando Bandinelli studied law and theology. He began the line of lawyer-popes that lasted until Pope Innocent III, who reestablished and expanded the Pope authority.
Pope Alexander III spent most of his papacy in exile due to a disagreement with Emperor Frederick Barbarossa. He worried that the church would have to do what the Emperor said, instead of the Emperor taking advice from the Pope. The conflict lasted years resulting in antipopes.
Despite his exile, Pope Alexander III also contributed many great things. He played a role in the development of universities and ordered teaching licenses given to worthy candidates without charge. He created policies that helped his successors. Finally, by the time he died, the church was in a more assured position than when he started. Exile did not stop him from doing his job, even in the 12th century.