5000

5000 was, according to the Fourth Doctor, the year of the Great Breakout, a time when humanity surged across the galaxy like a tidal wave. A ship en route to Titan Base encountered a virus of unknown origin. The Doctor identified it to be a sentient virus known as The Swarm. After the Doctor himself became infected by The Swarm, he and Leela went to the Bi-Al Foundation, where they were helped by Professor Marius and K9 Mark I to defeat/cure the virus. When the duo returned to the TARDIS to depart, they were then asked by the professor to take K9 with them. They agreed, thus starting the Doctor's long association with the K9 family of robots. (DW: The Invisible Enemy)