During Romana's Presidency of Gallifrey, Leela became her bodyguard, and the two K9 units were forced to work together, not always amicably. After Matthias had replaced Romana as President, he nominated her to undertake a mission to find a cure for the Free Time virus, to be followed by exile. K9 opted to remain in the employ of Matthias, fighting the infection on Gallifrey. However, Braxiatel and K9 had planned another operation. Realising that the only cure to the virus was to end the regeneration capabilities of the Time Lords, Braxiatel used a Time Scoop to collect the Time Lord bio-data archive (along with K9). Romana was asked to decide whether to administer the cure or let Gallifrey die and rebuild it from scratch with the bio-data archive. (AUDIO: Gallifrey)
After this he was tricked by Thorne to give him his regeneration unit for a lost memory chip. This turned him into a bomb to make him self-destruct on encountering Jixey. Starkey helped him disarm himself. (TV: Hound of the Korven) K9 Mark 2's brief life was almost cut tragically short when after the fall of the Korven invasion force, Thorne sent the Trojan to kill K9, who defeated it by burning out his power core and exhausting all his energy. As his regeneration unit was in the Trojan, K9 seemingly died at the mansion after his companions bade him farewell. However his regeneration unit homed in at the last minute and resurrected him, giving the frisky pup a new lease on life. The regeneration unit restored his old dog collar so he could celebrate the joyful occasion to the full as he flew off to more adventures, bristling with life. (TV: The Eclipse of the Korven)
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".