Mesopotamian literature tells the flood three times under three names, and the versions differ in what they think it was for.
The Sumerian account gives the survivor as Ziusudra, a pious king who is warned at the wall of his reed house by a god who will not break an oath directly and therefore speaks to the building. The Old Babylonian poem of Atrahasis supplies the motive: humanity has multiplied and its noise keeps the god Enlil from sleeping, and after plague and drought fail to reduce it he sends the flood. The standard Babylonian Gilgamesh takes the story over into its eleventh tablet and puts it in Utnapishtim's own mouth.
The details in that version are specific and physical. The vessel is not a ship but a cube, six decks dividing it into seven levels, sealed with bitumen inside and out; the craftsmen who built it are shut in with the animals and the family. The storm runs for six days and seven nights and the gods themselves are terrified by it, cowering at the wall of heaven like dogs, and the goddess who agreed to it cries out that she has destroyed her own people. When it stops, the boat has grounded and the silence is total. Utnapishtim releases a dove, which returns, a swallow, which returns, and a raven, which does not.
He offers sacrifice, and the gods gather around the smoke like flies. Enlil, finding that someone escaped, is furious until Ea points out that he punished the guilty and the innocent together, and Utnapishtim and his wife are set apart to live at the mouth of the rivers.