Story: The Earth is in chaos caused by powerful signals from an alien space probe. The Enterprise crew, while en route to Earth to face criminal charges (the result of their actions in Star Trek III: The Search for Spock), determine that the probe's signals are based on whale songs. Whales are extinct in the 23rd century, so they go back in time to the 20th century to retrieve some whales.
Scenery: Most of the scenes at the ficticious "Sausalito Cetacean Institute" were filmed at the Monterey Bay Aquarium. The Kelp Forest area was used as the viewing area for the whale tank. The exterior of the aquarium was made to appear as if it were in Sausalito by the addition of the San Francisco skyline placed in the background. Many scenes were filmed in San Francisco and the bay area.