Immortality in fiction

A photograph of a clay tablet with cuneiform writing
The Epic of Gilgamesh is the earliest known appearance of the concept of immortality in fiction.

Immortality is a common theme in fiction. The concept has been depicted since the Epic of Gilgamesh, the oldest known work of fiction. Originally appearing in the domain of mythology, it has later become a recurring element in the genres of horror, science fiction, and fantasy. For most of literary history, the dominant perspective has been that the desire for immortality is misguided, albeit strong; among the posited drawbacks are ennui, loneliness, and social stagnation. This view was challenged in the 20th century by writers such as George Bernard Shaw and Roger Zelazny. Immortality is commonly obtained either from supernatural entities or objects such as the Fountain of Youth or through biological or technological means such as brain transplants.