The Tragedy of Hamlet, Prince of Denmark, often shortened to Hamlet, is a tragedy written by William Shakespeare sometime between 1599 and 1601. It is Shakespeare’s longest play, with 29,551 words. The ghost of the King of Denmark tells his son Hamlet to avenge his murder by killing the new king, Hamlet’s uncle. Hamlet feigns madness, contemplates life and death, and seeks revenge. His uncle, fearing for his life, also devises plots to kill Hamlet. Hamlet is based on a Norse legend composed by Saxo Grammaticus in Latin around 1200 AD. The sixteen books that comprise Saxo Grammaticus’ Gesta Danorum, or History of the Danes, tell of the rise and fall of the great rulers of Denmark, and the tale of Amleth, Saxo’s Hamlet, is recounted in books three and four.