The Epic of Gilgamesh is an epic story from Babylonia and is among the earliest known literary works. Scholars surmise that a series of Sumerian legends and poems about the mythological hero-king Gilgamesh, thought to be a ruler in the 3rd millennium BC, were gathered into a longer Akkadian poem. Long afterward the most complete version in existence today is preserved on twelve clay tablets in the library collection of the 7th century BC Assyrian king Ashurbanipal. The essential story revolves around the relationship between Gilgamesh, a king who has become distracted and disheartened by his rule, and a friend, Enkidu, who is half-wild and who undertakes dangerous quests with Gilgamesh. Much of the epic focuses on Gilgamesh's thoughts of loss following Enkidu's death, and is often credited by historians as being one of the first literary work with high emphasis on immortality.