Emperor Justinian I, who ruled the Byzantine Empire from 527 to 565, is best known for his ambitious and successful efforts to reconquer lost Western Roman territories and for his codification of Roman law in the Corpus Juris Civilis, which has had a lasting influence on legal systems worldwide. His reign marked a high point in Byzantine cultural and architectural achievements, exemplified by the construction of the Hagia Sophia.