Star Trek II: The Wrath of Khan is a 1982 American science fiction film directed by Nicholas Meyer and based on the television series Star Trek. It is the second film in the Star Trek film series following Star Trek: The Motion Picture (1979), and is a sequel to the original series episode "Space Seed" (1967). 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). 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 is the beginning of a three-film story arc that continues with the film Star Trek III: The Search for Spock (1984) and concludes with the film Star Trek IV: The Voyage Home (1986). After the lackluster critical response to the first film, 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. Meyer completed its final script in twelve days, without accepting a writing credit. Meyer's approach evoked the swashbuckling atmosphere of the original series, a theme reinforced by James Horner's musical score. Leonard Nimoy had not intended to have a role in the 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 team used various cost-cutting techniques to keep within budget, including utilizing miniature models from past projects and reusing sets, effects footage, and costumes from the first film. The film was the first feature film to contain a sequence created entirely with computer graphics. Star Trek II: The Wrath of Khan was released in North America on June 4, 1982, by Paramount Pictures. It was a box office success, earning worldwide and setting a world record for its first-day box office gross. Critical reaction to the film was positive; reviewers highlighted Khan's character, Meyer's direction, improved performances, the film's pacing, and the character interactions as strong elements. Negative reactions focused on weak special effects and some of the acting. The Wrath of Khan is considered by many to be the best film in the Star Trek