Steven Spielberg wrote and produced the film, but a clause in his contract prevented him from directing another film while he made E.T. the Extra-Terrestrial. Therefore, Hooper was selected to direct based upon his work on The Texas Chain Saw Massacre and The Funhouse. First conceived as a dark horror sequel to Close Encounters of the Third Kind entitled Night Skies, when Spielberg approached Hooper to direct, Hooper was less keen on the sci-fi elements and suggested the idea of a ghost story.[3] Spielberg and Hooper would then go on to collaborate on the first treatment for the film.