"Imaginary Friend" is the 22nd episode of the fifth season of the American science fiction television series Star Trek: The Next Generation, the 122nd episode overall. Set in the 24th century, the series follows the adventures of the Starfleet crew of the Federation starship Enterprise-D. In this episode, a child's "imaginary" playmate threatens the well-being of the Enterprise.