Gilgamesh, the hero-king of Uruk
Gilgamesh may have been an actual king ruling in the city of Uruk around 2700 BC, but he was later deified and became the hero of many stories and eventually an epic. The Sumerian king-list, composed around 2100 BC, calls Gilgamesh the son of the goddess Ninsun and mentions that his father was a 'lillu' (spirit) who later became a high priest of Kullab (an area of Uruk). In the later epic, his father is Lugalbanda, another Sumerian hero king.
By the late third millennium BC, Gilgamesh became known as a 'king of the underworld'. There are five surviving Sumerian stories about him (dating around 2000 BC), some of which were reformulated into a great Babylonian epic. The best-known version of the epic comes from the Assyrian royal library at Nineveh in the seventh century BC.