Star Trek II: The Wrath of Khan is a 1982 American science fiction film released by Paramount Pictures. It is the second film based on Star Trek, and is a sequel to Star Trek: The Motion Picture (1979). The plot features Admiral James T. Kirk (William Shatner) and the crew of the starship USS Enterprise facing off against the genetically-engineered tyrant Khan Noonien Singh (Ricardo Montalbán), a character who first appeared in the 1967 Star Trek television series episode "Space Seed". When Khan escapes from a 15-year exile to exact revenge on Kirk, the crew of the Enterprise must stop him from acquiring a powerful terraforming device named Genesis. The film concludes with the death of the Enterprise's captain, Spock (Leonard Nimoy), beginning a story arc that continues with the 1984 film Star Trek III: The Search for Spock and concludes with 1986's Star Trek IV: The Voyage Home.
After the lackluster critical and commercial response to The Motion Picture, series creator Gene Roddenberry was forced out of the sequel's production. Executive producer Harve Bennett wrote the film's original outline, which Jack B. Sowards developed into a full script. Director Nicholas Meyer completed the final script in 12 days, without accepting a writing credit. Meyer's approach evoked the swashbuckling atmosphere of the original series, and the theme was reinforced by James Horner's musical score. Nimoy had not intended to have a role in The Motion Picture 's sequel, but was enticed back on the promise that his character would be given a dramatic death scene. Negative test audience reaction to Spock's death led to significant revisions of the ending over Meyer's objections. The production used various cost-cutting techniques to keep within budget, including utilizing miniatures from past projects and re-using sets, effects footage and costumes from the previous movie. Among the film's technical achievements is it being the first feature film to contain a complete sequence created entirely with computer-generated graphics.
The Wrath of Khan was released in North America on June 4, 1982. It was a box office success, earning US$97 million worldwide and setting a world record for first-day box office gross. Critical reaction to the film was positive; reviewers highlighted Khan, the film's pacing, and the character interactions as strong elements. Negative reaction focused on weak special effects and some of the acting. The Wrath of Khan is considered by some to be the best film of the Star Trek series, and is credited with renewing substantial interest in the franchise.
In the year 2285, Admiral James T. Kirk oversees a simulator session of Captain Spock's trainees. In the simulation, Lieutenant Saavik commands the starship USS Enterprise on a rescue mission to save the crew of a damaged ship. When the Enterprise enters the Klingon Neutral Zone to reach the ship it is attacked by Klingon cruisers and critically damaged. The simulation is named the "Kobayashi Maru"—a no-win scenario designed to test the character of Starfleet officers. Later, Dr. McCoy joins Kirk on his birthday; seeing Kirk in low spirits, the doctor advises Kirk to get a new command and not grow old behind a desk.