Gilgamesh was a great hero, whose stores are told in Sumerian and Babylonian poems. He is the son of the goddess Ninsun.
The Epic of Gilgamesh is a long poem that was composed before 2000 BCE. It tells the story of Gilgamesh and his friendship with Enkidu who search for immortality. Enkidu dies, though, and Gilgamesh finds the fame to be hollow. Gilgamesh goes to Utnapishtim (similar to the Bible's Noah) who tells him about his immortality, a gift he recieved during ‘the great flood’. Gilgamesh learns of a plant of life but the plant is swallowed by a snake. Gilgamesh learns that death is inevitable. This poem was preserved on clay tablets and deciphered much later.
The earliest written accounts of Gilgamesh date back to the second millenium BCE, although it is probable that they were transmitted for centuries orally before the known works were written.
Gilgamesh's character was based on a real king who ruled Uruk in approximatly 2600 BCE. Tales of this king circled for centuries before the Epic of Gilgamesh was ever written. Sumerian history also recorded that this king was the son of the goddess Ninsun.