Events before the start of Hamlet set the stage for tragedy. When the king of Denmark, Prince Hamlet’s father, suddenly dies, Hamlet’s mother, Gertrude, marries his uncle Claudius, who becomes the new king.
A spirit who claims to be the ghost of Hamlet’s father describes his murder at the hands of Claudius and demands that Hamlet avenge the killing. When the councilor Polonius learns from his daughter, Ophelia, that Hamlet has visited her in an apparently distracted state, Polonius attributes the prince’s condition to lovesickness, and he sets a trap for Hamlet using Ophelia as bait.
To confirm Claudius’s guilt, Hamlet arranges for a play that mimics the murder; Claudius’s reaction is that of a guilty man. Hamlet, now free to act, mistakenly kills Polonius, thinking he is Claudius. Claudius sends Hamlet away as part of a deadly plot.
After Polonius’s death, Ophelia goes mad and later drowns. Hamlet, who has returned safely to confront the king, agrees to a fencing match with Ophelia’s brother, Laertes, who secretly poisons his own rapier. At the match, Claudius prepares poisoned wine for Hamlet, which Gertrude unknowingly drinks; as she dies, she accuses Claudius, whom Hamlet kills. Then first Laertes and then Hamlet die, both victims of Laertes’ rapier.