Zex was from the Gger system in the fourth paraleptic level of the galaxy. The Master contacted him using an ionic vibrator and convinced him to help conquer Earth. Zex possessed Mrs Prentice and attacked the soldiers in UNIT. The Third Doctor and Professor Mirko Vetich built an astro modulator, a device that upset the equilibrium of beings from the fourth paraleptic level. After it was used against Zex, he was banished and Mrs Prentice was freed from his control. (PROSE: Listen - The Stars)