The Keller Machine was a device created by the Master under the alias of Emil Keller. In the machine's core was a living organism, a psychic parasite. It was designed to extract from human brains the negative impulses that caused anti-social behavior, and was therefore a more humane alternative to executing criminals. It could also be used to kill by turning the victim's worst fears against them.
After being used to process 112 cases in Switzerland, Professor Keller, with the assistance of Professor Kettering, had it installed in Stangmoor Prison. Its subsequent use on George Patrick Barnham was witnessed by several people, including the Third Doctor, Jo Grant, Arthur Linwood, (TV: The Mind of Evil) and James Stevens. (PROSE: Who Killed Kennedy) It went on to kill Linwood through his fear of rats and Kettering through his fear of drowning, and almost killed the Doctor through his fear of fire (recently acquired on a trip to a parallel Earth). The Master used it to disrupt the World Peace Conference, hoping to cause World War III. Chin Lee used a telepathic amplifier to enable the machine to work on Senator Alcott, who was nearly killed by his fear of the Chinese before the Doctor stopped her.
Returning to Stangmoor Prison, the Doctor was captured by the Master and subjected to the machine, causing him to hallucinate several of his old enemies (including a Dalek, a Zarbi, Koquillion, a War Machine, Slaar, a Cyberman and a Silurian) until one of his hearts gave out. By this time however, the machine was starting to grow out of the Master's control, at one point taunting him with a vision of the Doctor, and began teleporting itself around the prison to feed on the inmates' minds. The Doctor created a device to temporarily immobilise the machine, but it was not until later that he discovered that Barnham, due to not having any negative impulses, acted as a natural dampener on it. The machine was destroyed in the detonation of the Thunderbolt missile. (TV: The Mind of Evil)