Balaam was originally a human prophet.

The events happened exactly the same as the myth, from talking with his jenny (female cuddy or donkey) until he met Gabriel, however this time Gabriel failed to prevent him from climbing the mount and was defeated because he didn't use his full power, He reached the mount and exactly like the myths, instead of cursing Moses he cursed himself and his family. The earth swallowed him up, but he didn't die, instead he used his magical exoskeleton to protect himself, then he reached the Netherworld, specifically Svartalfheim, where he learned the demonic powers with help from the king of dark elves Armageddon, then the duergars (dark dwarves) turned him into a mutant by transplanting a bull head, ram head, and snake as tail for him, and then training him until he managed to control his new organs

Balaam was very rebellious mage and as fallen prophet, he deserves the Marid title, given to him by Asmodeus as one of 72 servants of Solomon and kings of hell.

Despite all things, Balam didn't hate his human origin and didn't lose even an atom of his holy powers, instead he became immortal due to duergars' enhancements.