Daniel Mainwaring (22 July 1902 – 31 January 1977) was a novelist and screenwriter. A native of Oakland, California, he began his professional career as a journalist for the San Francisco Chronicle and enjoyed a successful career as a mystery novelist (under the name Geoffrey Homes). He also worked as a film publicist and eventually abandoned fiction for a successful career as a screenwriter.
His first novel (and the only one he ever published under his own name), One Against the Earth, was a proletarian novel about a young man born on a California ranch who becomes a drifter and is eventually unjustly accused of attacking a child, was published in 1932. He made his real mark, however, with a string of hard-boiled mystery novels (mostly with small-town California settings), the first of which was The Man Who Murdered Himself (1936). His final published novel, Build My Gallows High (William Morrow & Co., 1946), is generally regarded as his best—and its adaptation (by "Homes" himself) into the film noir classic Out of the Past assured his place in film history. Mainwaring explained to interviewer Pat McGilligan that he regarded the novel as a departure from his earlier literary efforts:
With Build My Gallows High, I wanted to get away from straight mystery novels. Those detective stories are a bore to write. You've got to figure out "whodunit". I'd get to the end and have to say whodunit and be so mixed up I couldn't decide myself. 
By the time Out of the Past appeared in 1947, Mainwaring had already begun to devote himself exclusively to screenwriting (usually under the Homes pseudonym). Other notable credits during this period included The Big Steal (1949, directed by Don Siegel) and This Woman is Dangerous (1952, with Joan Crawford). His first important film work bearing his real name were the 1954 shot-on-location crime thriller The Phenix City Story (1954) and the original version of Invasion of the Body Snatchers (1956). Part of what made the latter film's vision of an alien invasion of a small California town was its convincing evocation of small-town life. As director Joseph Losey, whose The Lawless was adapted by Mainwaring from the writer's own short story (publication undetermined), The Voice of Stephen Wilder, noted:
This is one of the things that makes me very close to Dan Mainwaring--his experience of Americana, the nostalgia of the good things about small towns. I remember the smell of burning leaves at night in the autumn too. And I remember the smell of Christmas, the sparkle in the air at football games, and the sound of distant trains. And Dan remembers them all. He's a much underrated writer and he's a really quite noble man. He damaged himself with drink and he was very badly hurt by the blacklist.
According to Frank Krutniks book Un-American“ Hollywood, Loseys memory seems to serve him wrong here. Mainwaring's widow remembers that actually Mainwaring himself acted as a front for blacklisted author Paul Jarrico. Also, his name appears on several movie credits in the 1950s which would have been impossible for a blacklisted author. The first film to break the blacklisting rule by naming a "banned" screenwriter (here: Dalton Trumbo) in the credits was Otto Preminger's 1960 film Exodus. The fact that Mainwaring's work on Ida Lupino's film noir The Hitch-Hiker was not credited is most likely due to non-political reasons.
In 1960, Mainwaring was hired by fantasy-film producer-director George Pal to write the screenplay for the MGM Studios film Atlantis, the Lost Continent, released in 1961. He based his script on a play written by Gerald Hargreaves in 1945.
- Michel Ciment: Conversations with Losey, Methuen & Company, London, 1985.
- Frank Krutnik: "Un-American" Hollywood: Politics and Film in the Blacklist Era, Rutgers University Press, 2007.