K9 stayed with Leela on Gallifrey for many years. It was only after the disappearance of her Time Lord husband, Andred, that Leela and her K9 met Romana II and her K9. The two K9s did not get on well and competed. (AUDIO: Weapon of Choice) After Leela became Romana's bodyguard and after many important missions on her behalf, Leela's K9 was destroyed by an exploding bomb. Leela was heartbroken, but refused to have a duplicate unit built. (AUDIO: Imperiatrix)
Whereas Sarah Jane lifted K9 Mark III into and out of her car, (TV: A Girl's Best Friend) K9 Mark IV had a "hover mode" allowing him to negotiate the stairs of the Smiths' three-story house and bi-level attic, and to enter and exit cars. (TV: The Wedding of Sarah Jane Smith, The Gift) The Eleventh Doctor implied that Mark IV was not the first to have the ability to hover. (TV: The Power of Three)
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".