The fantasy of manners is a subgenre of fantasy literature that also partakes of the nature of a comedy of manners (though it is not necessarily humorous). Such works generally take place in an urban setting and within the confines of a fairly elaborate, and almost always hierarchical, social structure. The term was first used in print by science fiction critic Donald G. Keller in an article, The Manner of Fantasy, in the April, 1991 issue of The New York Review of Science Fiction, although author Ellen Kushner has said that she suggested the term to Keller. The subgenre, or a close relative to it, has also been called mannerpunk, a tongue-in-cheek reference to the cyberpunk subgenre of science fiction.
"Fantasy of manners" is fantasy literature that owes as much or more to the comedy of manners as it does to the traditional heroic fantasy of J. R. R. Tolkien and other authors of high fantasy. Author Teresa Edgerton has stated that this is not what Keller originally meant by the term, but "the term has since taken on a life of its own". The protagonists are not pitted against fierce monsters or marauding armies, but against their neighbors and peers; the action takes place within a society, rather than being directed against an external foe; duels may be fought, but the chief weapons are wit and intrigue.
Major influences on the subgenre include the social novels of Jane Austen, the drawing room comedies of P. G. Wodehouse, and the historical romances of Georgette Heyer. Many authors also draw from nineteenth century popular novelists such as Anthony Trollope, the Brontë sisters, and Charles Dickens. Traditional romances of swashbuckling adventure such as The Three Musketeers by Alexandre Dumas, The Scarlet Pimpernel by Baroness Orczy, or the works of Rafael Sabatini may also be influences. The Ruritanian romances typified by The Prisoner of Zenda by Anthony Hope, or George Barr McCutcheon's Graustark itself, are also of some consequence as literary precedents, as are the historical novels of Dorothy Dunnett. Although such works all contain elements which influenced the genre, the first example of the genre-proper is widely considered to be Gormenghast by Mervyn Peake.