Midnight Cowboy is a 1969 American drama film based on the 1965 novel of the same name by James Leo Herlihy. The script was written by Waldo Salt, directed by John Schlesinger, and stars Jon Voight in the title role alongside Dustin Hoffman. Notable smaller roles are filled by Sylvia Miles, John McGiver, Brenda Vaccaro, Bob Balaban, Jennifer Salt and Barnard Hughes; M. Emmet Walsh appears in an uncredited cameo. The film won three Academy Awards: Best Picture, Best Director and Best Adapted Screenplay. To date, it is the only X-rated film ever to win Best Picture. It has since been labeled as one of the greatest American movies of all time.