 When Emperor Anastasius died in 518 , Justin was proclaimed the new emperor , with significant help from Justinian . During Justin 's reign ( 518 – 527 ) , Justinian was the emperor 's close confidant . Justinian showed much ambition , and it has been thought that he was functioning as virtual regent long before Justin made him associate emperor on 1 April 527 , although there is no conclusive evidence for this . As Justin became senile near the end of his reign , Justinian became the de facto ruler . Justinian was appointed consul in 521 and later commander of the army of the east . Upon Justin 's death on 1 August 527 , Justinian became the sole sovereign . 
