Star Trek IV: The Voyage Home (1986) concludes the story arc begun with Star Trek II: The Wrath of Khan (1982) and continued in Star Trek III: The Search for Spock (1984), but on a wholly new, different, and upbeat note. As the movie opens, months have elapsed since the events in Star Trek III; Admiral Kirk (William Shatner), McCoy (DeForest Kelley), Scott (James Doohan), Sulu (George Takei), Uhura (Nichelle Nichols), and Chekhov (Walter Koenig) are marooned in self-imposed exile on Vulcan, along with the resurrected and regenerated Spock (Leonard Nimoy, who also directed). While Spock tries to sort out the Vulcan and human halves of his resurrected psyche, the others prepare to return to Earth to face a brace of charges by the Klingon Empire and Star Fleet over events on Genesis. Taking off in their commandeered, jerry-rigged Klingon ship, they head to Earth, not knowing that a new crisis could destroy their home world -- a huge, immensely powerful alien probe has entered the galaxy and established a position near Earth, disabling every vehicle and installation in its path with its energy and communication output, and has ionized the entire atmosphere and started vaporizing the oceans, leaving the planet only hours to survive.
Spock determines that the probe is sending out signals to another intelligent terrestrial life form, humpbacked whales, which no longer exist. Using the gravity slingshot time-warp effect (established early in the original series) to travel back into Earth's 20th century, Kirk and company land in 1980s San Francisco to try and bring humpbacked whales to the 23rd century, to respond to the probe. Thus starts a surprisingly breezy, light-hearted, yet serious odyssey through the past (comparable to the best work of the original series), as the crew learns to deal with exact-change buses, angry drivers, punk-rock enthusiasts and other elements of '80s life, and Kirk tries to persuade a scientist (Catherine Hicks) of his good intentions for two whales in captivity. The screenplay, co-authored by Steve Meerson, Peter Krikes, Nicholas Meyer, and Harve Bennett (from a story by Nimoy and Bennett), is the cleverest and most sophisticated of all the Star Trek movie screenplays, recalling some of the elements of Meyer's earlier time-travel movie Time After Time and also anticipating the feel and tone of the series Star Trek: The Next Generation (which would be on the air not quite a year later). Nimoy's direction offers a combination of brisk pacing and a deep love of the characters and the actors, as well as a serious appreciation of the humorous aspects of the script, and Shatner gives his best performance of any of the movies.