Mystery fiction is a loosely-defined term that is often used as a synonym of detective fiction — in other words a novel or short story in which a detective (either professional or amateur) solves a crime. The term "mystery fiction" may sometimes be limited to the subset of detective stories in which the emphasis is on the puzzle element and its logical solution (cf. whodunit), as a contrast to hardboiled detective stories which focus on action and gritty realism. However, in more general usage "mystery" may be used to describe any form of crime fiction, even if there is no mystery to be solved. For example, the Mystery Writers of America describes itself as "the premier organization for mystery writers, professionals allied to the crime writing field, aspiring crime writers, and those who are devoted to the genre".
Although normally associated with the crime genre, the term "mystery fiction" may in certain situations refer to a completely different genre, where the focus is on supernatural mystery (even if no crime is involved). This usage was common in the pulp magazines of the 1930s and 1940s, where titles such as Dime Mystery, Thrilling Mystery and Spicy Mystery offered what at the time were described as "weird menace" stories – supernatural horror in the vein of Grand Guignol. This contrasted with parallel titles such as Dime Detective, Thrilling Detective and Spicy Detective, which contained conventional hardboiled crime fiction. The first use of "mystery" in this sense was by Dime Mystery, which started out as an ordinary crime fiction magazine but switched to "weird menace" during the latter part of 1933.
The massive popularity of pulp magazines in the 1930s and 1940s increased interest in mystery fiction. Pulp magazines decreased in popularity in the 1950s with the rise of television so much that the numerous titles available then are reduced to two today: Alfred Hitchcock's Mystery Magazine and Ellery Queen's Mystery Magazine. The detective fiction author Ellery Queen (pseudonym of Frederic Dannay and Manfred B. Lee) is also credited with continuing interest in mystery fiction.
Interest in mystery fiction continues to this day because of various television shows which have used mystery themes over the years and the many juvenile and adult novels which continue to be published. There is some overlap with "thriller" or "suspense" novels and authors in those genres may consider themselves mystery novelists. Comic books and graphic novels have carried on the tradition, and film adaptations have helped to re-popularize the genre in recent times.
The Mystery Writers of America, an organization for authors of mystery, detective, and crime fiction, was founded in 1945. This popular genre has made the leap into the online world, spawning countless websites devoted to every aspect of the genre, with even a few supposedly written by real detectives.