The Scarlet Letter is an 1850 romantic work of fiction written by Nathaniel Hawthorne, and is considered to be his magnum opus. Set in 17th-century Puritan Boston, Massachusetts, during the years 1642 to 1649, it tells the story of Hester Prynne, who conceives a daughter through an affair and struggles to create a new life of repentance and dignity. Throughout the book, Hawthorne explores themes of legalism, sin, and guilt.