The Enterprise is undergoing a major refit, and James T. Kirk has been promoted to Admiral and is now Chief of Starfleet Operations at Starfleet Headquarters on Earth. A powerful alien force, in the shape of a massive energy cloud, is detected in Klingon space and is believed to be heading for Earth. The cloud destroys three Klingon starships and Epsilon 9, a Starfleet monitoring station that it encounters en route. Starfleet decides to dispatch the starship USS Enterprise to intercept the cloud, requiring its lengthy refit process to be quickly finished and tested while in transit.