The Epic of Gilgamesh is an epic poem from ancient Mesopotamia that is often regarded as the earliest surviving great work of literature. The literary history of Gilgamesh begins with five Sumerian poems about 'Bilgamesh' (Sumerian for 'Gilgamesh'), king of Uruk, dating from the Third Dynasty of Ur (circa 2100 BC). These independent stories were later used as source material for a combined epic. The first surviving version of this combined epic, known as the "Old Babylonian" version, dates to the 18th century BC and is titled after its incipit, Shūtur eli sharrī ("Surpassing All Other Kings"). Only a few tablets of it have survived. The later "Standard" version dates from the 13th to the 10th centuries BC and bears the incipit Sha naqba īmuru ("He who Saw the Deep", in modern terms: "He who Sees the Unknown"). Approximately two thirds of this longer, twelve-tablet version have been recovered. Some of the best copies were discovered in the library ruins of the 7th-century BC Assyrian king Ashurbanipal.
The first half of the story discusses Gilgamesh, king of Uruk, and Enkidu, a wild man created by the gods to stop Gilgamesh from oppressing the people of Uruk. After Enkidu becomes civilized through sexual initiation with a harlot, he travels to Uruk, where he challenges Gilgamesh to a test of strength. Gilgamesh wins and the two become friends. Together, they make a six-day journey to the legendary Cedar Forest, where they plan to slay the Guardian, Humbaba the Terrible, and cut down the sacred Cedar. Later they kill the Bull of Heaven, which the goddess Ishtar sends to punish Gilgamesh for spurning her advances. As a punishment for these actions, the gods sentence Enkidu to death.
In the second half of the epic, distress about Enkidu's death causes Gilgamesh to undertake a long and perilous journey to discover the secret of eternal life. He eventually learns that "Life, which you look for, you will never find. For when the gods created man, they let death be his share, and life withheld in their own hands". However, because of his great building projects, his account of Siduri's advice, and what the immortal man Utnapishtim told him about the Great Flood, Gilgamesh's fame survived his death. His story has been translated into many languages, and in recent years has featured in works of popular fiction.