The Epic of Gilgamesh () is an epic from ancient Mesopotamia. The literary history of Gilgamesh begins with five Sumerian poems about Gilgamesh (formerly read as Sumerian "Bilgames"), king of Uruk, some of which may date back to the Third Dynasty of Ur (c. 2100 BCE). These independent stories were later used as source material for a combined epic in Akkadian. The first surviving version of this combined epic, known as the "Old Babylonian" version, dates back to the 18th century BCE 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 Babylonian version compiled by Sîn-lēqi-unninni dates to somewhere between the 13th to the 10th centuries BCE and bears the incipit Sha naqba īmuru ("He Who Saw the Deep(s)", lit. "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 BCE Assyrian King Ashurbanipal.
The first part of the story discusses Gilgamesh, king of Uruk, and Enkidu, a wild man created by the gods to stop Gilgamesh from oppressing his people. After Enkidu becomes civilized through sexual initiation with Shamhat, he travels to Uruk, where he challenges Gilgamesh to a test of strength. Gilgamesh wins the contest; nonetheless, the two become friends. Together, they make a six-day journey to the legendary Cedar Forest, where they ultimately slay its Guardian, Humbaba, and cut down the sacred Cedar. The goddess Ishtar sends the Bull of Heaven to punish Gilgamesh for spurning her advances. Gilgamesh and Enkidu kill it, insulting Ishtar in the process. The gods decide to sentence Enkidu to death by giving him a fatal illness.