The Enterprise is dragged off course by an imploded star, Questar M-17. The crew discover an alien vessel in orbit around the star which is occupied by a shapeless alien life form. When the creature seizes control of the Enterprise, Kirk orders the ship onto a collision course with Questar M-17. Believing the ship is about to be destroyed, the creature departs the ship. In fact the Enterprise is able to use a slingshot manoeuvre to escape, leaving the creature trapped orbiting the imploded star forever.