She first appeared in 1973 in "The Time Warrior", and then travelled with the Third Doctor. After the Doctor regenerated, she travelled with the Fourth Doctor. At the end of "The Hand of Fear", the Doctor had to go back to Gallifrey, where Sarah Jane was not allowed to go. Sarah Jane left the TARDIS and the Doctor, and returned to Earth.