The Master's trial

During the Third Doctor's exile on the planet Earth, was captured by UNIT and placed on trial.

Capture
Posing as a vicar named "Victor Magister" in the village of Devil's End (TV: The Dæmons; PROSE: Who Killed Kennedy) after murdering the old vicar, Canon Smallwood, (PROSE: The Eight Doctors) the Master summoned the ancient Dæmon Azal, but he failed to understand the power and control that was necessary following summoning him. Following Azal's confrontation with Jo Grant's selflessness, Azal destroyed himself through Jo's illogical actions. The Master was captured by UNIT following a failed attempt to escape in the Doctor's car, Bessie. (TV: The Dæmons)

In custody
Prior to his trial, the Master was sent to Stangmoor Prison. During his captivity, an army of hypnotised salespeople stormed the facility and attempted to rescue him, but the ploy failed and the Master was sent to another secure holding facility. Meanwhile, the Doctor and Jo were trapped in an extra-universal prison by the Freedom Corporation, so the Brigadier was forced to strike a deal with the Master to save them. But the Master double-crossed him and used time travel technology to regress the Earth backwards in time. However, with help from the Time Lords, the Doctor was freed and was able to stop the Master's plan and restore everything to normal. (PROSE: Freedom)

The trial
At his trial, the government used the Master as a scapegoat for all the alien attacks which had recently occurred. (PROSE: Who Killed Kennedy)

Incarceration
The Master was held at Aylesbury Grange Detention Centre. Demanding the Doctor visit him, he engaged the Doctor in conversation, insisting he had changed. However, the Doctor refused to believe him, and the Master reluctantly revealed that he had drawn the Doctor to the facility as part of an escape attempt and that the Doctor was speaking to a hologram. The Master nearly escaped but was stopped by UNIT soldiers accompanying the Doctor, who revealed he had been a hologram as well. (COMIC: The Man in the Ion Mask)

In another escape attempt, the Master created a device that switched his mind with the Doctor's. He went to the Doctor's TARDIS, where he learned that the Time Lords had made the TARDIS ineffective to the Doctor's piloting. Before returning to his own body, he asked the Brigadier to move him to a new holding facility with a good view, and also encouraged Mike Yates to ask Jo Grant out on a date. (PROSE: The Switching)

While in custody, with the Doctor on Peladon, (TV: The Curse of Peladon) the Master collaborated with UNIT to prevent an invasion by a fascist version of Earth, travelling with the Brigadier, Ian and Barbara Chesterton to the alternate universe and encountering Koschei, the alternate version of himself. Koschei was imprisoned and tortured by order of the Leader of the Republic of Great Britain. The Master killed his other self, claiming it was an act of mercy. Before he was imprisoned by UNIT again, the Master hid his TARDIS back in the church crypt in Devil's End. (PROSE: The Face of the Enemy)

The Master was imprisoned inside a castle prison on Fortress Island as the only prisoner. The Master convinced his jailer, Colonel George Trenchard, to help him steal electronic parts from HMS Seaspite, telling Trenchard that this was intended as a lure for enemy agents. With these parts, the Master instead made contact with the reptilian Sea Devils, an aquatic species similar to the land-dwelling Silurians, and planned to cause a war between humans and Sea Devils, making the Sea Devils rulers of Earth again. Because the reactivation machinery of the Sea Devils' hibernation units deteriorated during millions of years of hibernation, the Master saw it necessary to construct a sonar device to awaken the remaining reptiles.

The Master captured the Doctor and forced him to help create this device, but to prevent the device from reactivating further Sea Devil bases and stop the war, the Doctor blew up the Sea Devil base by reversing the device's polarity, creating a massive reverse feedback. The Master escaped in a hovercraft when the officer guarding him, CPO Myers, was hypnotised and framed as the Master's corpse, (TV: The Sea Devils) and the Master returned to the church crypt in Devil's End to retrieve his TARDIS. (PROSE: The Eight Doctors)