Justinian I, also known as Justinian the Great, was a Byzantine emperor who ruled from 527 to 565 AD. Synonyms for his name may include Emperor Justinian I, Justinian the First, or Justinianus Magnus. He is often referred to as the last Roman emperor or the first Byzantine emperor, as he played a key role in the transition from the Roman to the Byzantine Empire. Justinian I is best known for his ambitious building program, including the construction of the Hagia Sophia, and his legal reforms, which resulted in the creation of a new legal code known as the Corpus Juris Civilis. He is also known for his military campaigns, particularly in North Africa and Italy.