K9 Mark III was a gift from the Doctor to Sarah Jane Smith (TV: A Girl's Best Friend). This K9 was broken for many years, until he was repaired by the Tenth Doctor. This K9 also had a "maximum defence mode", as well as offensive capabilities, such as a nose-mounted laser gun. He sacrificed himself to save Deffry Vale High School from Krillitanes. (TV: School Reunion)
A third model, K9 Mark III was evidently constructed by the Fourth Doctor; indeed, the Eighth Doctor did not dispute the presumption that he had built this K9. (PROSE: Interference - Book Tqo) Mark III travelled with the Fourth Doctor and Adric for a time. (PROSE: Inter-Galactic Cat) Eventually, however, he was shipped in 1978 to Sarah Jane Smith at the home she had shared with her Aunt Lavinia in South Croydon during her companionship of the Third and Fourth Doctors. (TV: A Girl's Best Friend) Since parting ways with the Doctor (TV: The Hand of Fear) however, Sarah Jane had already gone away and was travelling extensively. The following year, Lavinia purchased a manor house and market garden in Moreton Harwood, Gloucester, and took the still crated K9 with her. On 18 December 1981, Sarah Jane and her foster brother Brendan Richards arrived at Lavinia's home for Christmas, but Lavinia had left early for her lecture series in the United States. Sarah Jane opened the crate and received her new companion. (TV: A Girl's Best Friend)
This K9 exhibited the ability to sense and warn others of danger. He was also more mobile than his predecessor, despite his problems with the swamps of Delta III, able to lift himself up on small support rods so that he could climb stairs (PROSE: The Shadow of Weng-Chiang, TV: The Power of Kroll, The Armageddon Factor) The Doctor often used a glib remark to disarm those who were surprised by K9's appearance, such as "They're all the rage in Trenton, New Jersey." (TV: The Stones of Blood)
The Fourth Doctor and K9 Mark II spent an indeterminate period of time together. However, the Doctor appeared to be activating K9 Mark II, implying that no significant time had elapsed since leaving Gallifrey. (TV: The Ribos Operation) It is possible that the Doctor spent some time at Nest Cottage before activating him. (AUDIO: The Stuff of Nightmares)
Professor Frederick Marius, who invented the first K9 in the year 5000 while working on the asteroid K4067, described him as "my best friend and constant companion." Marius had a dog on Earth, but weight requirements did not allow him to bring his real dog into space, so he built K9. (TV: The Invisible Enemy) He built K9 by using the latest technology. Marius used his own medical computer, a state-of-the-art intraresponsive brain app, protective anti-radiation cladding, probes, a laser scapel, a vision and voice box and two scanning antennas. He put these parts together and created K9. (PROSE: One Man and His Dog) According to one account, the Professor copied the remnants of one of the versions of K9 created by the Doctor and given to Sarah Jane Smith. (PROSE: Tautology)
Someday K9 saved the people at the Aurora from being killed by a Federation war cruiser. (PROSE: Peaceniks) When K9 wanted to help a space ship navigating back to New Earth he met Interstitials. These creatures were living in a state relating to the space or time between things. K9 helped them pass into another existence where it was better for them. (PROSE: Interstitials)
K9 had a personality very consistent across the models with some contact with the Doctor. He was polite and formal, with pedantry bordering on condescension. Though he often displayed feelings such as sorrow (TV: The Invasion of Time) and self-regard (TV: School Reunion), he often stated that he had not been programmed to have emotions. (TV: Invasion of the Bane)
K9, retroactively "K9 Mark I" (Leeson), initially appeared in The Invisible Enemy (1977) as the creation of Professor Marius (Frederick Jaeger) in the year 5000. K9 subsequently travelled with the Fourth Doctor (Tom Baker) and Leela (Louise Jameson) as a companion of the Doctor in his adventures in time and space until The Invasion of Time (1978). In this serial, K9 decides to remain on the Doctor's home planet of Gallifrey with Leela. Immediately afterwards, Doctor Who would introduce a second incarnation of K9, played by the same prop; the last scene of The Invasion of Time shows the Doctor unpacking a box labeled "K9 Mk II".