Tom Baker was in a dour mood on set, as he missed Lalla Ward and disliked being surrounded by so many newcomers.
Melkur was initially supposed to be the sole survivor of Traken's sister planet and the inventor of the Source. He did not become an alias for the Master until later in preproduction.
Johnny Byrne's script dealt with millennalism: the belief that the turn of each millennium will be heralded by a period of cataclysm and upheaval, as espoused by Zoroastrianism and by some Christian sects. With only 20 years left until the year 2000, Byrne felt that this was becoming a timely and interesting topic. He wanted to tie this notion into the tumult that sometimes results when a long-serving head of state dies or retires.
The story was originally set in a mediaeval-type society, divided between the scientific Greys and the zealous Blacks, led by Hellas and Zorca, respectively. Zorca summons a being called Mogen he believes is a demon, but whom the Doctor later realises is the last survivor of a race of super-beings with fantastic mental abilities. Mogen wants to take control of the powerful Source in order to use Traken as the launching pad for galactic conquest. Zorca frames Adric for murder, and the cliffhanger for episode two originally involved the Doctor, Adric and Hellas on the brink of execution, about to be crushed between blocks of steel. A key element of part four was a stolen component from the TARDIS, which Mogen uses to construct a time disintegrator with which he plans to kill the Doctor. Byrne also introduced Hellas' daughter, Nyssa, whom he named for a friend of his called Nerissa.