This period of crisis ended with the ascension of the emperor Diocletian in 284 CE. He not only managed to survive for twenty years after taking the throne, he also reorganized the Empire and pulled it back from the brink. Recognizing that the sheer size of the Empire was a detriment to its effective governance, Diocletian decided to share power with a co-emperor: Diocletian ruled the eastern half of the Empire and his co-emperor Maximian ruled the west. Then, about ten years after he took the throne, Diocletian decided to further divide responsibility and each emperor took on junior emperor. This created the Tetrarchy, the rule of four. Diocletian further subdivided the Empire, so that for the rest of his reign, the four co-emperors (two “augusti” and two “caesars”) worked together to administer the entire territory.
Diocletian’s hope was that the tetrarchy would end the cycle of assassinations. The junior emperors were the senior emperors’ respective heirs, destined to assume full power when their seniors stepped down. When that happened, each new senior emperor would then select new juniors. The overall effect was, if it worked, a neat succession of power instead of the constant bloodshed and uncertainty that had haunted Roman politics for half a century; this system was quite similar to the merit-based selection process of emperors that had held during the rule of the Five Good Emperors.
Diocletian also divided the Empire into smaller provinces so that governors had an easier time with administration. These provinces were grouped into larger units called dioceses overseen by an official called a “vicar.” When Christianity moved from being an illegal cult to the official religion of the Empire, the division of imperial territory into dioceses, overseen by vicars, would be adopted by the Catholic Church, and it persists all the way to the present in the administration of the church.
To deal with the threat of both Persia and the Germanic barbarians, Diocletian reorganized the Roman army and recruited more soldiers, making it larger than it ever had been. He built new roads for military use to be able to move armies along the borders more efficiently. Borrowing from the Persian practice, he emphasized the use of heavy cavalry to respond quickly to threats. Finally, even though the army itself was now larger, he made individual legions smaller, so that each legion’s commander no longer had enough power to take over with a single attack on the current emperor (that worked well enough for Diocletian himself, but it made little difference in the long run).
State finances were in shambles when Diocletian came to power. To try to deal with the problem, Diocletian reformed the tax system and instituted an official census for taxation purposes. He also tried to freeze wages and prices by decree, something that did not work since it created a black market for both goods and labor. Peasants bore the brunt of Diocletian's reforms; most independent farmers that still existed were turned into serfs (coloni), one step above slaves. State tax collectors were so feared that many peasants willingly gave their land to wealthy landowners who promised to protect them from the tax agents.
Finally, Diocletian tried to reinstate religious orthodoxy. He believed that too many people had turned away from worship of the Roman gods, which had in turn brought about the long period of crisis preceding his takeover. Thus, he went after sects that he thought threatened stability, including Christianity. He banned Christian worship and executed several thousand Christians who refused to renounce their beliefs in an attempt to wipe out the cult once and for all. Needless to say, this was a spectacular failure.
Diocletian retired in 305 CE due to failing health, as did (reluctantly) his co-emperor in the west. The idea behind the Tetrarchy was that the junior emperors would then become the senior emperors and recruit new juniors - this system worked exactly once, as the junior emperors under Diocletian and Maximian took power. Instead of a smooth transition inaugurating a stable new beginning, however, the Empire was yet again plunged into civil war. A general (at the time stationed in Britain) named Constantine, son of the Tetrarch Constantius, launched a military campaign to reunite the Empire under his sole rule. By 312 CE he had succeeded, claiming total control and appointing no co-emperor.