Plot twist

A plot twist is a literary technique that introduces a radical change in the direction or expected outcome of the plot in a work of fiction. When it happens near the end of a story, it is known as a twist ending or surprise ending. It may change the audience's perception of the preceding events, or introduce a new conflict that places it in a different context. A plot twist may be foreshadowed, to prepare the audience to accept it, but it usually comes with some element of surprise. There are various methods used to execute a plot twist, such as withholding information from the audience, or misleading them with ambiguous or false information. Not every plot has a twist, but some have multiple lesser ones, and some are defined by a single major twist.

Since the effectiveness of a plot twist usually relies on the audience's not having expected it, revealing a plot twist to readers or viewers in advance is commonly regarded as a spoiler. Even revealing the fact that a work contains plot twists – especially at the ending – can also be controversial, as it changes the audience's expectations. However, at least one study suggests that this does not affect the enjoyment of a work.

Early examples
An early example of the romance genre with multiple twists was the Arabian Nights tale "The Three Apples". It begins with a fisherman discovering a locked chest. The first twist occurs when the chest is broken open and a corpse is found inside. The initial search for the murderer fails, and a twist occurs when two men appear, separately claiming to be the murderer. A complex chain of events finally reveals the murderer to be the investigator's own slave.

Mechanics
Literary analysts have identified several common categories of plot twists, based on how they are executed.

Anagnorisis
Anagnorisis, or discovery, is the protagonist's sudden recognition of his or her own or another character's true identity or nature. Through this technique, previously unforeseen character information is revealed. A notable example of anagnorisis occurs in Oedipus Rex: Oedipus kills his father and marries his mother in ignorance, learning the truth only toward the climax of the play. The earliest use of this device as a twist ending in a murder mystery was in "The Three Apples", a medieval Arabian Nights tale, where the protagonist Ja'far ibn Yahya discovers by chance a key item towards the end of the story that reveals the culprit behind the murder to have been his own slave all along.

Flashback
Flashback, or analepsis, a sudden, vivid reversion to a past event, surprises the reader with previously unknown information that solves a mystery, places a character in a different light, or reveals the reason for a previously inexplicable action. The Alfred Hitchcock film Marnie employed this type of surprise ending. Sometimes this is combined with the above category, as the flashback may reveal the true identity of one of the characters, or that the protagonist is related to one of the villain's past victims, as Sergio Leone did with Charles Bronson's character in Once Upon a Time in the West or Frederick Forsyth's The Odessa File.

Cliffhanger
A cliffhanger or cliffhanger ending, is a plot device in fiction which features a main character in a precarious or difficult dilemma or confronted with a shocking revelation at the end of an episode of serialized fiction. A cliffhanger is hoped to incentivize the audience to return to see how the characters resolve the dilemma. A notable example is in the 1980 Star Wars film The Empire Strikes Back where protagonist Luke Skywalker who initially believed that the antagonist Darth Vader had killed his father, Anakin after Obi-Wan Kenobi told it to him in A New Hope is shocked and horrified when the latter tells him that he himself is his father Anakin, with the revelation eventually being fully dealt with and resolved in Return of the Jedi (1983).

Unreliable narrator
An unreliable narrator twists the ending by revealing, almost always at the end of the narrative, that the narrator has manipulated or fabricated the preceding story, thus forcing the reader to question his or her prior assumptions about the text. This motif is often used within noir fiction and films, notably in the film The Usual Suspects. An unreliable narrator motif was employed by Agatha Christie in The Murder of Roger Ackroyd, a novel that generated much controversy due to critics' contention that it was unfair to trick the reader in such a manipulative manner. Another example of unreliable narration is a character who has been revealed to be insane and thus causes the audience to question the previous narrative; notable examples of this are in the Terry Gilliam film Brazil, Chuck Palahniuk's Fight Club (and David Fincher's film adaptation), Gene Wolfe's novel Book of the New Sun, the second episode of Alfred Hitchcock Presents, Premonition, the 1920 German silent horror film The Cabinet of Dr. Caligari, Iain Pears's An Instance of the Fingerpost, Shutter Island and Kim Newman's Life's Lottery. The term "unreliable narrator" is sometimes applied to films (such as the aforementioned Brazil and Shutter Island) which do not feature any voice-over narration in a conventional sense, but whose protagonists are still considered "narrators" in the sense that the film is presented from their perspective and the audience mainly encounters the narrative and diegesis through that character's point of view.

Peripeteia
Peripeteia is a sudden reversal of the protagonist's fortune, whether for good or ill, that emerges naturally from the character's circumstances. Unlike the deus ex machina device, peripeteia must be logical within the frame of the story. An example of a reversal for ill would be Agamemnon's sudden murder at the hands of his wife Clytemnestra in Aeschylus' The Oresteia or the inescapable situation Kate Hudson's character finds herself in at the end of The Skeleton Key. This type of ending was a common twist ending utilised by The Twilight Zone, most effectively in the episode "Time Enough at Last" where Burgess Meredith's character is robbed of all his hope by a simple but devastating accident with his eyeglasses. A positive reversal of fortune would be Nicholas Van Orton's suicide attempt after mistakenly believing himself to have accidentally killed his brother, only to land safely in the midst of his own birthday party, in the film The Game.

Deus ex machina
Deus ex machina is a Latin term meaning "god from the machine." It refers to an unexpected, artificial or improbable character, device or event introduced suddenly in a work of fiction to resolve a situation or untangle a plot. In Ancient Greek theater, the "deus ex machina" ('ἀπὸ μηχανῆς θεός') was the character of a Greek god literally brought onto the stage via a crane (μηχανῆς—mechanes), after which a seemingly insoluble problem is brought to a satisfactory resolution by the god's will. The term is now used pejoratively for any improbable or unexpected contrivance by which an author resolves the complications of the plot in a play or novel, and which has not been convincingly prepared for in the preceding action; the discovery of a lost will was a favorite resort of Victorian novelists.

Red herring
A red herring is a false clue intended to lead investigators toward an incorrect solution. This device usually appears in detective novels and mystery fiction. The red herring is a type of misdirection, a device intended to distract the protagonist, and by extension the reader, away from the correct answer or from the site of pertinent clues or action. The Indian murder mystery film Gupt: The Hidden Truth cast many veteran actors who had usually played villainous roles in previous Indian films as red herrings in this film to deceive the audience into suspecting them.

In the bestselling novel The Da Vinci Code, the misdeeds of a key character named "Bishop Aringarosa" draw attention away from the true master villain ("Aringarosa" literally translates as "pink herring"). In the William Diehl novel Primal Fear (also adapted into a film), a defendant named Aaron Stampler is accused of brutally murdering the Archbishop of Chicago. He is revealed to have a dissociative identity disorder, and is not executed on plea of insanity. Near the end, Aaron's lawyer discovers that he feigned his insanity to avoid the death penalty. Agatha Christie's classic And Then There Were None is another famous example and includes the term as well in a murder ploy where the intended victims are made to guess that one of them will be killed through an act of treachery.

The complete second timeline of the sixth season of the television series Lost is a red herring: initially, this second timeline seems to be an alternate timeline in which Oceanic 815 never crashes (the main timeline revolves around the crashing of such plane on an island). However, one of the last scenes reveals that this timeline is "a place" where the characters of the series meet after they have died, similar to the Bardo or Limbo concept. A red herring can also be used as a form of false foreshadowing.

False protagonist
A false protagonist is a character presented at the start of the story as the main character, but then disposed of, usually killed to emphasize that they will not return. An example is Psycho's Marion Crane (portrayed by Janet Leigh), who is brutally murdered about halfway through the film. Another instance is the film Executive Decision, in which the special-forces team leader, played by highly-billed action star Steven Seagal, is killed shortly after the mission begins. The character of Casey Becker (played by then A-list actress Drew Barrymore) in Scream is killed in the first fifteen minutes. An example in literature and television is Ned Stark in the Game of Thrones franchise, who is killed before the end of the first book/season, despite receiving the most focus of the ensemble of characters.

Non-linear narrative
A non-linear narrative works by revealing plot and character in non-chronological order. This technique requires the reader to attempt to piece together the timeline in order to fully understand the story. A twist ending can occur as the result of information that is held until the climax and which places characters or events in a different perspective. Some of the earliest known uses of non-linear story telling occur in The Odyssey, a work that is largely told in flashback via the narrator Odysseus. The Aeneid, another epic poem, uses a similar approach; it begins with the main protagonist, Aeneas, telling stories about the end of the Trojan War and the first half of his journey to Dido, queen of Carthage. The nonlinear approach has been used in works such as the films Mulholland Drive, Sin City, Saw IV, Premonition, Arrival, Pulp Fiction, Memento, Babel, the television shows Lost, How to Get Away with Murder, How I Met Your Mother (especially in many episodes in the later seasons), Heroes, Westworld, the book Catch-22, and WandaVision.

Reverse chronology
Reverse chronology works by revealing the plot in reverse order, i.e., from final event to initial event. Unlike chronological storylines, which progress through causes before reaching a final effect, reverse chronological storylines reveal the final effect before tracing the causes leading up to it; therefore, the initial cause represents a "twist ending". Examples employing this technique include the films Irréversible, Memento, Happy End and 5x2, the play Betrayal by Harold Pinter, and Martin Amis' Time's Arrow. Stephen Sondheim and George Furth's Merrily We Roll Along and the 1934 Kaufman and Hart play that inspired it both tell the story of the main characters in reverse order.