Ages ago, before it was known as the Nine Hells, the small planet Baator was home to a winged race of beings known as the avariel. The leader of the avariel was a powerful immortal known as Asmodeus. Asmodeus was a lawful but prideful immortal, and he became convinced that it was his destiny to slay the corrupted lord of the Tetrahedron, Primus.
Asmodeus led a contingent of the most powerful avariel into the Tetrahedron, and the group fought its way to the center of the ship. After a long, hard-fought battle, only Asmodeus and Primus remained in the chamber at the Tetrahedron's core. As Asmodeus approached to do battle with Primus, the evil Primus begged for his life and, appealing to Asmodeus' vanity, acknowledged Asmodeus as the superior being. In exchange for his life, Primus offered to Asmodeus his greatest asset, a second yellow cube that Primus had been constructing, similar to the very extradimensional cube which had corrupted Primus. Primus claimed that a being with the lawful heart and wisdom of Asmodeus would be able to use the cube for good, and provide the Pyrax system with a counterbalance to his own evil power.
Whether through magical enchantment or simple guile, Primus was able to convince Asmodeus to accept his offer. Asmodeus took the small cube and returned to Baator. He began mistaking law for goodness, and became obsessed with rules and punishment. Some of the avariel joined Asmodeus as he assembled an army to conquer the solar system in the name of his rapidly degrading sense of justice. Others saw through his corruption and rebelled.
The avariel fought a long and brutal civil war. Asmodeus eventually lost all pretense of righteousness as his power grew, and he granted infernal powers to the avariel who sided with him, creating the devils. As the rebellious avariel began to be slaughtered, the Celestial Emperor saw the good in them and granted them divine powers of their own, creating the angels. The angels and the devils fought for a hundred years, but the devils continuously gained the upper hand. Eventually the angels retreated to Carceri and other planets, from which they continue to battle the devils. For seven thousand years the planet Baator has rested firmly in the hands of the devils.