K9 Mark III first appeared in "A Girl's Best Friend", the 1981 pilot for a series, K-9 and Company, which never materialized beyond the first episode. In this, the character is presented to the Doctor's former companion Sarah Jane Smith (Elisabeth Sladen); together, the two embark on what a number of adventures. Only the first of these is depicted on-screen; several are shown in comic book and audio play adaptations, and others are alluded to by the television series. Mark III made a brief appearance alongside Sarah Jane in the Doctor Who 20th anniversary ninety-minute special The Five Doctors (1983), before appearing properly and for the final time in the revived series' episode "School Reunion" in 2006. By the time of that story, Mark III has fallen into disrepair and eventually sacrifices himself to stop a plot by the alien Krillitane and defeat their leader, Lucas Finch (Anthony Head). In the episode's conclusion, the Doctor presents Sarah Jane with a new K9 to encourage her to continue investigating alien activity; the Doctor "rebuilt" him after the Mark III's sacrifice, implying that he had the same mind and memories as his predecessor while still being a "brand new model".
Either Inspector Thorne or Lomax found out about K9's regeneration unit and decided to acquire it. Thorne joined forces with Freddie Maxwell, owner of Crashclub involving old robots being made to fight. K9 went undercover as a gladiator and made friends with the robot clowns Chuckles and Boris. He was called to fight the Pain-Maker, who was laced with the explosive solarmite. When he was set to self-destruct, K9 detected this and fled the explosion. (TV: Robot Gladiators) To regain his memory and find out his connection to the STM, K9's archive was scrambled. Directives from the STM almost caused him to self-destruct and lose all his memory. However, with Gryffen and Starkey's help he overrode the directives. (TV: Mind Snap) He helped Gryffen find the STM's temporal stabiliser from the fallen angel crash site in Canada, where it was revealed to be Korven technology. (TV: Angel of the North) He stopped haywire CCPCs when The Last Precinct's plan backfired. (TV: The Last Precinct)
When Romana eventually returned to her own universe, she brought K9 Mark II with her (presumably having repaired it) and eventually became Lady President of Gallifrey. K9 Mark II is first seen on Gallifrey in the Virgin New Adventures novel Lungbarrow by Marc Platt, alongside K9 Mark I, which had remained with Leela. Both K9 Mark I and Mark II appear, voiced by Leeson, in the Big Finish Productions audio adventure Zagreus and the Gallifrey audio series. Leela's K9 (Mark I) was destroyed at the conclusion of the second Gallifrey series and only Mark II appears in the third series.
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".