Space amoeba

Space amoebas were gigantic spaceborne life forms which fed on time energy at the Galactic Rim. One of these drifted away from its home until, lost and hungry, it found the Doctor's TARDIS and began consuming it, causing time to reverse inside the ship. K-9 reverts to his component parts and the Doctor regressed through his regenerations to his first incarnation. When he re-enacted the time he first switched on the TARDIS, but in reverse, this caused the creature to weaken, allowing time to move forward again. The switch was then thrown on, then back off, then on and so on. Each time the switch changed, the entity experienced indigestion and weakened until it eventually died. As time began moving forward once again, the Doctor and K-9 return to normal, and all that was left of the entity was a puddle on the TARDIS floor. (DWM: Timeslip)