The Doctor developed a good working relationship with the Brigadier. At first, it was a partnership initially born out of convenience — the Doctor required facilities to try to repair his TARDIS to break the exile, and UNIT needed his expertise in combating the threats they encountered, but eventually, the two became great friends. In fact, even when his much resented exile was lifted, the highly moral and dashing Third Doctor stayed on for a while to help UNIT protect the Earth from all manner of alien threats.
During this time, a renegade Time Lord, the Master, plagued the Third Doctor with his diabolical schemes, including the summoning of an ancient Dæmon, and unleashing the terrifyingly powerful Kronos, a Chronovore. Although the Master was a criminal genius, the Doctor was always able to outwit him, but the Master, with astronomical cunning, always managed to escape in the end.
The Doctor's exile was finally lifted by the Time Lords after he helped save them from destruction at the hands of Omega. Free to roam space and time again and joined by the fiercely independent investigative journalist Sarah Jane Smith, the Doctor had several more adventures. While fighting an invasion of Earth by Giant Spiders from Metebelis 3 (Planet of the Spiders), however, he contracted massive radiation poisoning. Dying, he returned to UNIT Headquarters and regenerated for the third time...