He was a major recurring enemy of the Marvels in the DC Comics stories published before the continuity-resetting Crisis on Infinite Earths miniseries in 1985.
Originally, the Wizard Shazam was called Shazamo. He was a powerful wizard and led a pantheon of heroes whose initials formed its name: Solomon, Hercules, Atlas, Zeus, Achilles, Mercury ... and Oggar. However, power corrupted Oggar, who was a former pupil of Shazamo. At one point, Oggar refused an order from Shazamo to help a small nation that was being invaded by a tyrant. Oggar stated that Shazamo was getting old and that he himself should lead the Pantheon. After engaging in combat with Shazamo, he could not counter the wizard's power. Shazamo consequently condemned Oggar to live among mortals and subsequently removed the "O" from its name. Before leaving, Oggar remained close enough to the gates of the Shazamo temple that he heard a prophecy: In the twentieth century, the wizard (now Shazam) would die and would have a successor named Billy Batson. Billy was destined to become Captain Marvel and acquire the combined powers of the remaining heroes of the Pantheon. Oggar thought it would be wise to wait until the twentieth century when there would only be Captain Marvel rather than seven enemies to defeat. However, 3000 years ago, in the mortal world, Oggar tried to seduce the beautiful Circe to be his queen while attempting to conquer the world but she refused (Note: This is Earth-S Circe; yet she resembles the mythological figure but is not the same Circe from the actual DC Universe). Oggar tried to avenge himself, but his magic is unable to harm women. So instead he gave her a gift by making her immortal. However, the spell did nothing to mitigate the effects of aging and after about 200 years she was still alive, but terribly ugly and wrinkled. She eventually developed a mortal hatred of all men who were now horrified by her face. She learned witchcraft and how to turn men into animals. After his rebellion, the wizard Shazam cursed Oggar with cloven hooves.
Oggar returned in the 20th Century and battled Captain Marvel as he tried to recruit people to the Cult of the Curse. If they left they were driven mad. However he finally encountered Circe, who turned him into a boar. In this form he fell into a precipice and died. However he was able to reform himself with his magic and joined the Monster Society of Evil.
Oggar has divine strength and durability equal to Captain Marvel's and magic that enabled him to do nearly anything, like turning Captain Marvel back with lightning, or muting people, although each spell could only be used once against the same person. Oggar's power cannot be used to directly harm a female target (however, Oggar has repeatedly worked around this limitation: one time by giving immortality to Circe without giving her an eternally youthful appearance and another time by directing the magical lightning against the ground beneath Mary Marvel). Oggar can also fly, is immortal, and cannot age. However he is vulnerable to magical transformation spells.