Justinian I ruled the eastern Roman empire from 527 to 565, reconquered North Africa and Italy, rebuilt Hagia Sophia and had Roman law codified.
Justinian ruled from Constantinople for thirty-eight years, from 527 to 565, and spent them trying to reverse the collapse of the western Roman empire.
He very nearly managed it. North Africa fell to his armies in a single campaign season, Italy and southern Spain followed, and for a moment the Mediterranean was again ringed by Roman territory.
What he could not do was pay for it. Plague, exhaustion and permanent war on the Persian frontier meant the reconquest outlived him only barely, and the effort marked the eastern empire for a century afterwards.
He was born around 482 at Tauresium in the Balkans, into a Latin-speaking provincial family of no distinction whatever.
His rise came entirely through his uncle Justin, a soldier who worked his way up the guard and became emperor in 518. Justin brought his nephew to the capital, had him educated, and adopted him.
By the time Justin died in 527 Justinian was already running much of the government, so his accession changed the title rather than the direction.
Justinian is unusually well documented and unusually hard to read, because the same writer left two irreconcilable accounts of him. Procopius wrote the Wars, which treats the emperor as a serious if flawed ruler, and the Secret History, which portrays him as a demon in human form who destroyed more than he built.
What both accounts agree on is the working habit. He barely slept, read everything, involved himself in the smallest administrative detail and in theological argument, and was nicknamed "the emperor who never sleeps". Contemporaries found him accessible and exhausting in roughly equal measure.
He was also politically dependent on his wife Theodora to a degree that scandalised the aristocracy. During the Nika riots of 532, with the capital burning, it was reportedly Theodora who refused to let him flee — and the regime survived because he stayed. The relationship is the single most discussed feature of his character and the hardest to see past the hostility of the sources.
The Nika riots of 532 nearly ended him in his fifth year: two circus factions united against the government, half Constantinople burned and a rival was proclaimed. The rising was put down with great slaughter, and Justinian emerged with no serious opposition left.
He then turned outward. In 533 he sent Belisarius against the Vandal kingdom of Africa, and against the expectations of his own council the campaign destroyed it within months. Italy followed, in a war that dragged on for two decades.
The reconquest was always financed on a shoestring, with armies too small for the ground they held, and it depended on commanders — Belisarius, and later Narses — performing far beyond what their resources should have allowed.
His most durable achievement had nothing to do with armies. He ordered the whole inherited mass of Roman law reduced to order, and the result — the Codex, Digest, Institutes and Novels, later called the Corpus Juris Civilis — became the foundation of the European legal tradition.
He rebuilt Hagia Sophia after the Nika riots on a scale nobody had attempted, with a dome that contemporaries found barely credible, and it remained the largest church in Christendom for nearly a thousand years.
The building programme ran across the empire — fortifications, cisterns, churches and frontier works — and Procopius catalogued it in a separate book, the Buildings, whose flattery is as informative as the Secret History's venom.
In 541 plague reached the empire and returned repeatedly for two centuries. Its first outbreak killed a very large share of the population of Constantinople and of the empire, and the manpower and tax base never recovered within his lifetime.
The armies in Italy were left starved of reinforcement, the Gothic War dragged on far past any reasonable expectation, and the frontier with Persia demanded permanent expense.
He died in 565 leaving an empire larger on the map than the one he inherited and materially weaker, and within a generation much of the western reconquest had been lost again.