The oldest recorded flood myth is the epic of Atra-Hasis, an Akkadian epic from 18th century BCE recorded on clay tablets.
The god Enlil wanted to wipe out all of humanity with a great flood. The god Enki however warned the wise priest Atra-Hasis, cleverly instructing him to build a large ark gathering animals and birds as well.
Description of Atra-Hasis boarding the ark and the onset of the great flood
Bringing ...whatever he had ...Whatever he had ...Pure animals he slaughtered, cattle ...Fat animals he killed. Sheep ...he choose and and brought on board. The birds flying in the heavens, the cattle and the ... of the cattle god, the creatures of the steppe,... he brought on board... he invited his people... to a feast... his family was brought on board. While one was eating an another was drinking, he went in and out; he could not sit, could not kneel, for his heart was broken, he was retching gall.
The outlook of the weather changed. Adad began to roar in the clouds. The god they heard, his clamor. He brought pitch to seal his door. By the time he had bolted his door, Adad was roaring in the clouds. The winds were furious as he set forth, He cut the mooring rope and released the boat.
... the storm... were yoked Anzu rent the sky with his talons,
He ... the land and broke its clamor like a pot... the flood came forth. Its power came upn the peoples like a battle,
one person did not see another, they could not recognize each other in the catastrophe. The deluge belowed like a bull, The wind resounded like a screaming eagle.
The darkness was dense, the sun was gone,... like flies.
- The epic of Atra-Hasis.
Everyone on the ark survived the flood and Atra-Hasis offered sacrifices for the gods. The other gods condemned Enlil’s flood and allowed humanity to repopulate the earth.
A variation of the story is also found in the epic of Ziusudra and later the flood myth in the epic of Gilgamesh would be inspired from this. Later flood myths of the region like the Biblical flood narrative is believed to be inspired from these.