The standard version was discovered by Austen Henry Layard in the library of Ashurbanipal in Nineveh in 1849. It was written in standard Babylonian, a dialect of Akkadian that was only used for literary purposes. This version was compiled by Sin-liqe-unninni sometime between 1300 and 1000 BC out of older legends.
The standard version and earlier old Babylonian version are differentiated based on the opening words, or incipit. The older version begins with the words "Surpassing all other kings", while the standard version's incipit is "He who saw the deep" (ša nagbu amāru). The Akkadian word nagbu, "deep", is probably to be interpreted here as referring to "unknown mysteries". However, Andrew George believes that it refers to the specific knowledge that Gilgamesh brought back from his meeting with Uta-Napishti (Utnapishtim): he gains knowledge of the realm of Ea, whose cosmic realm is seen as the fountain of wisdom. In general, interpreters feel that Gilgamesh was given knowledge of how to worship the gods, of why death was ordained for human beings, of what makes a good king, and of the true nature of how to live a good life. Utnapishtim, the hero of the Flood myth, tells his story to Gilgamesh, which is related to the Babylonian Epic of Atrahasis.
The 12th tablet is appended to the epic representing a sequel to the original 11, and was most probably added at a later date. This tablet has commonly been omitted until recent years. It has the startling narrative inconsistency of introducing Enkidu alive, and bears seemingly little relation to the well-crafted and finished 11-tablet epic; indeed, the epic is framed around a ring structure in which the beginning lines of the epic are quoted at the end of the 11th tablet to give it at the same time circularity and finality. Tablet 12 is actually a near copy of an earlier Sumerian tale, a prequel, in which Gilgamesh sends Enkidu to retrieve some objects of his from the Underworld, but Enkidu dies and returns in the form of a spirit to relate the nature of the Underworld to Gilgamesh — an event which seems to many superfluous given Enkidu's dream of the underworld in Tablet VII.
The story starts with the introduction of Gilgamesh, king of Uruk. Gilgamesh, two-thirds god and one-third man, oppresses the city's citizens who cry out to the gods for help. For the young women of Uruk this oppression takes the form of a droit de seigneur — or "lord's right" — to newly married brides on their wedding night. For the young men it is conjectured that Gilgamesh exhausted them through games, tests of strength, or perhaps forced labour on building projects. The gods respond to the citizens' plea for intervention by creating an equal to Gilgamesh who will distract him from these objectionable activities. They create a primitive man, Enkidu, who is covered in hair and lives in the wild with the animals.He is spotted by a trapper, as he has been uprooting traps and thus ruining the trapper's livelihood. The trapper tells Gilgamesh of the man and seduces him with a skilled harlot. His seduction by Shamhat, a temple prostitute, is the first step in his civilization, and she proposes to take him back to Uruk after making love. Gilgamesh, meanwhile, has been having dreams that relate to the imminent arrival of a new companion.
Shamhat brings Enkidu to the shepherds' camp where he is introduced to a human diet and becomes the camp's night watchman. Learning from a passing stranger about Gilgamesh's treatment of new brides, Enkidu is incensed and travels to Uruk to intervene at a wedding. When Gilgamesh attempts to visit the wedding chamber, Enkidu blocks his way and they fight. After a fierce battle, Enkidu acknowledges Gilgamesh's superior strength and they become friends. Gilgamesh proposes that they journey together to the Cedar Forest to slay the monstrous demi-god Humbaba, in order to gain fame and renown. Despite warnings from both Enkidu and the council of elders, Gilgamesh will not be deterred.
The elders give Gilgamesh advice for his journey. Gilgamesh visits his mother, the goddess Ninsun, who seeks the support and protection of the sun-god Shamash for the two adventurers. Ninsun adopts Enkidu as her son, Gilgamesh leaves instructions for governing Uruk in his absence, and they embark on their quest.
Gilgamesh and Enkidu journey to the Cedar Forest. Every few days they make camp on a hill or mountain to perform a dream ritual. Gilgamesh has five terrifying dreams that involve falling mountains, thunderstorms, wild bulls, and a thunderbird that breathes fire. Despite similarities between the dream figures and earlier descriptions of Humbaba, Enkidu interprets all of the dreams as good omens, denying that any of the frightening images represent the forest guardian. As they approach the cedar mountain, they hear Humbaba bellowing and have to encourage each other not to be afraid.
The heroes enter the cedar forest and their fears return. Humbaba, the ogre-guardian of the Cedar Forest, insults and threatens them. He accuses Enkidu of betrayal, then vows to disembowel Gilgamesh and feed his flesh to the birds. Gilgamesh is afraid, but with some encouraging words from Enkidu the battle commences. The mountains quake with the tumult and the sky turns black. The god Shamash sends his 13 winds to bind Humbaba and he is captured. The monster pleads for his life, and Gilgamesh pities him. Enkidu, however, is enraged and asks Gilgamesh to kill the beast. Humbaba curses them both and Gilgamesh dispatches him with a blow to the neck. The two heroes cut down many cedars, including a gigantic tree that Enkidu plans to fashion into a door for the temple of Enlil. They build a raft and return home along the Euphrates with the giant tree and the head of Humbaba.
Gilgamesh rejects the advances of the goddess Ishtar because of her mistreatment of previous lovers like Dumuzi. Ishtar asks her father Anu to send the "Bull of Heaven" to avenge her. When Anu rejects her complaints, Ishtar threatens to raise the dead who will "outnumber the living" and "devour them". Anu becomes frightened and gives in. The bull of heaven (apparently the constellation Taurus) is led to Uruk by Ishtar, and causes widespread devastation. It dries up the reed beds and marshes, then dramatically lowers the level of the Euphrates river. It opens up huge pits in the ground that swallow 300 men. Enkidu and Gilgamesh attack and slay the beast without any divine assistance and offer up its heart to Shamash. When Ishtar cries out in agony, Enkidu hurls one of the bull's hindquarters at her. The city of Uruk celebrates, but Enkidu has an ominous dream.
In Enkidu's dream, the gods decide that one of the heroes must die for slaying the Bull of Heaven and Humbaba. Despite the protestations of Shamash, Enkidu is marked for death. Enkidu considers the great door he fashioned for Enlil's temple, and curses it. He also curses Shamhat and the trapper for removing him from the wild. Then Shamash speaks from heaven, reminding Enkidu of how Shamhat fed and clothed him, and introduced him to Gilgamesh. Gilgamesh will bestow great honors upon him at his funeral, and will later wander the wild consumed with grief. Enkidu regrets his curses and blesses Shamhat, temporarily calmed. In a second dream, however, he sees himself being taken captive to the Netherworld by a terrifying Angel of Death. The underworld is a "house of dust" and darkness whose inhabitants eat clay and are clothed in bird feathers, supervised by terrifying beings. For twelve days, Enkidu's condition worsens. Finally, after a last lament that he could not meet a heroic death in battle, he dies.
Gilgamesh delivers a long lamentation for Enkidu, in which he calls upon forests, mountains, fields, rivers, wild animals, and all of Uruk to mourn for his friend. Recalling their adventures together, Gilgamesh tears at his hair and clothes in grief. He commissions a funerary statue and provides valuable grave gifts from his treasury to ensure a favourable reception for Enkidu in the realm of the dead. A great banquet is held where the treasures are ceremonially offered to the gods of the Netherworld. There is a possible reference to the damming of a river before the text breaks off, which might suggest a riverbed burial as in the corresponding Sumerian poem, The Death of Gilgamesh. .
Gilgamesh is grieving for Enkidu and roaming the wild clothed in animal skins. Fearful of his own death, his object is to find the legendary Utnapishtim ("the Faraway"), and learn the secret of eternal life. Among the few survivors of the Great Flood, Utnapishtim and his wife are the only humans to have been granted immortality by the gods. Early in his travels, Gilgamesh crosses a mountain pass at night and encounters a pride of lions. He prays for protection to the moon god Sin before sleeping. Then, waking from an encouraging dream, he slays the lions and takes their skins for clothing. Eventually, after a long and perilous journey, Gilgamesh comes to the twin peaks of Mt Mashu at the ends of the earth. The entrance, which no man has ever crossed, is guarded by two terrible scorpion-men. After questioning him and recognising his semi-divine nature, they allow Gilgamesh to pass and travel through the mountains along the Road of the Sun. He follows it for twelve "double hours" in complete darkness. Managing to complete the trip before the sun catches up to him, Gilgamesh arrives in a garden paradise full of jewel-laden trees.
Gilgamesh meets the alewife Siduri, who first believes Gilgamesh is a murderer from his dishevelled appearance, and tells her the purpose of his journey. Siduri attempts to dissuade him from his quest but sends him to Urshanabi, the ferryman, to help him cross the sea to Utnapishtim. Urshanabi is in the company of stone-giants. Gilgamesh considers them hostile and kills them. When he tells Urshanabi his story and asks for help, he is told that he just killed the only creatures able to cross the Waters of Death. The Waters of Death, analogous to the River Styx of Greek mythology, are deadly to the touch, so Urshanabi asks him to cut 120 trees and fashion them into punting poles. Finally, they reach the island of Utnapishtim. Utnapishtim sees that there is someone else in the boat and asks Gilgamesh who he is. Gilgamesh tells him his story and asks for help, but Utnapishtim reprimands him because fighting the common fate of humans is futile and diminishes life's joys.
The earliest Sumerian Gilgamesh stories date from as early as the Third Dynasty of Ur (2100 BC-2000 BC). The earliest Akkadian versions are dated to ca. 2000-1500 BC. The five extant Sumerian Gilgamesh stories do not include a separate account of his journey to Utnapishtim (Ziusudra in Sumerian), but they do refer to it. In a list of Gilgamesh's accomplishments, found in the story of his death, we read of his journey to meet Ziusudra and the cultic knowledge that he brought back to the people of Uruk. There is also a short description of the flood in the same context, as the gods debate whether to grant Gilgamesh eternal life like they did for Ziusudra. The "standard" Akkadian version, of course, included a complete flood story and was edited by Sin-liqe-unninni sometime between 1300 BC and 1000 BC. This longer flood story is, itself, based on the one contained in the Epic of Atrahasis (circa 1800 BC).
Gilgamesh argues that Utnapishtim is not different from him and asks him his story, and why he has a different fate. Utnapishtim tells him about the great flood. His story is a summary of the story of Atrahasis (see also Gilgamesh flood myth) but skips the previous plagues sent by the gods. He reluctantly offers Gilgamesh a chance for immortality, but questions why the gods would give the same honor as himself, the flood hero, to Gilgamesh and challenges Gilgamesh to stay awake for six days and seven nights first. However, just when Utnapishtim finishes his words Gilgamesh falls asleep. Utnapishtim ridicules the sleeping Gilgamesh in the presence of his wife and tells her to bake a loaf of bread for every day he is asleep so that Gilgamesh cannot deny his failure. When Gilgamesh, after seven days, discovers his failure, Utnapishtim reprimands him and sends him back to Uruk with Urshanabi.
The moment that they leave, Utnapishtim's wife asks her husband to have mercy on Gilgamesh for his long journey. Utnapishtim tells Gilgamesh of a boxthorn-like plant at the very bottom of the ocean that will make him young again. Gilgamesh obtains the plant by binding stones to his feet so he can walk the bottom of the sea. He does not trust the plant and plans to test it on an old man's back when he returns to Uruk. Unfortunately he places the plant on the shore of a lake while he bathes, and it is stolen by a serpent. Gilgamesh weeps at the futility of his efforts, having now lost all chance of immortality. He then returns to Uruk, where the sight of its massive walls prompts him to praise this enduring work to Urshanabi.
This tablet is to a large extent an Akkadian translation of an earlier Sumerian poem, Bilgamesh and the Netherworld (also known as "Gilgamesh, Enkidu, and the Netherworld" and variants), although it has been suggested that it is based on an unknown version of that story. The contents of this last tablet are inconsistent with previous ones: Enkidu is still alive, despite having been killed off earlier in the epic. Because of this, its lack of integration with the other tablets, and the fact that it is almost a copy of an earlier version, it has been referred to as an 'inorganic appendage' to the epic. Alternatively, it has been suggested that "its purpose, though crudely handled, is to explain to Gil-gamesh (and the reader) the various fates of the dead in the Afterlife" as "an awkward attempt to bring closure", a connection between the Gilgamesh in the epic and the Gilgamesh as King of the Netherworld in Mesopotamian religion, or even "a dramatic capstone whereby the twelve-tablet epic ends on one and the same (heme, that of "seeing" (= understanding, discovery, etc.), with which it began."
Gilgamesh complains to Enkidu that various objects he possessed (the tablet is unclear exactly what — different translations include a drum and a ball) fell into the underworld. Enkidu offers to bring them back. Delighted, Gilgamesh tells Enkidu what he must and must not do in the underworld in order to come back. Enkidu does everything he was told not to do. The underworld keeps him. Gilgamesh prays to the gods to give him his friend back. Enlil and Suen don’t bother to reply but Ea and Shamash decide to help. Shamash cracks a hole in the earth and Enkidu's ghost jumps out of it. The tablet ends with Gilgamesh questioning Enkidu about what he has seen in the underworld.