- You may be looking for Gog and Magog.
Magog was the most fearsome and powerful of the Malevilus.
He and the other four Malevilus were worshipped as gods in an alternate Roman Empire, having taken over the body of Adolphus Caesar's mother Juno, and planning to do the same to Adolphus when he succeeded to the throne. Upon entering the Fourth Doctor's TARDIS, the Doctor tricked Magog into being imprisoned in an empty dimension. (COMIC: Doctor Who and the Iron Legion)
The Seventh Doctor and Ace briefly encountered Magog, or what was left of him, still trapped in the Doctor's TARDIS and pleading for release as his power was being drawn by the Mandragora Helix as it rearranged the TARDIS interior. (COMIC: The Mark of Mandragora)