Gilgamesh (Akkadian: ๐ญ๐๐๐ฆ, romanized: Gilgameลก; originally Sumerian: ๐ญ๐๐๐ต๐, romanized: Bilgames was a hero in ancient Mesopotamian mythology and the protagonist of the Epic of Gilgamesh, an epic poem written in Akkadian during the late 2nd millennium BC. He was possibly a historical king of the Sumerian city-state of Uruk, who was posthumously deified. His rule probably would have taken place sometime in the beginning of the Early Dynastic Period, c. 2900 โ 2350 BC, though he became a major figure in Sumerian legend during the Third Dynasty of Ur (c.โ2112 โ c.โ2004 BC).
Tales of Gilgamesh's legendary exploits are narrated in five surviving Sumerian poems. The earliest of these is likely "Gilgamesh, Enkidu, and the Netherworld", in which Gilgamesh comes to the aid of the goddess Inanna and drives away the creatures infesting her huluppu tree. She gives him two unknown objects, a mikku and a pikku, which he loses. After Enkidu's death, his shade tells Gilgamesh about the bleak conditions in the Underworld. The poem Gilgamesh and Aga describes Gilgamesh's revolt against his overlord Aga of Kish. Other Sumerian poems relate Gilgamesh's defeat of the giant Huwawa and the Bull of Heaven, while a fifth, poorly preserved poem relates the account of his death and funeral.
In later Babylonian times, these stories were woven into a connected narrative. The standard Akkadian Epic of Gilgamesh was composed by a scribe named Sรฎn-lฤqi-unninni, probably during the Middle Babylonian Period (c.โ1600 โ c.โ1155 BC), based on much older source material. In the epic, Gilgamesh is a demigod of superhuman strength who befriends the wild man Enkidu. Together, they embark on many journeys, most famously defeating Humbaba (Sumerian: Huwawa) and the Bull of Heaven, who is sent to attack them by Ishtar (Sumerian: Inanna) after Gilgamesh rejects her offer for him to become her consort. After Enkidu dies of a disease sent as punishment from the gods, Gilgamesh becomes afraid of his death and visits the sage Utnapishtim, the survivor of the Great Flood, hoping to find immortality. Gilgamesh repeatedly fails the trials set before him and returns home to Uruk, realizing that immortality is beyond his reach.