The Epic of Gilgamesh
Trickster god who keeps Utanapishtim from dying in the flood by giving him the inside scoop on Ea's flood plans.
The god Ea features in the Flood story on Tablet 11. According to Utanapishtim, Ea helped him escape the deadly deluge that claimed the lives of most of humanity by warning Utanapishtim about the oncoming storm via a wall made of reeds.
He also told this wall made of reeds the exact dimensions of the boat it would have to build, if it wanted to survive the catastrophe. Hey—it's not like Ea could have known that Utanapishtim was standing on the other side of those reeds, and, thus, was able to hear every word he said, right? And, when a voice emerged from the other side of that reed wall asking what it should tell the people who asked why he was building a boat … well, Ea just figured that was the reed wall talking.
Ea also shows a friendly side when he sticks up for Utanapishtim after the Flood, when Enlil is enraged to discover survivors. Ea basically tells the chief god that it serves him right for trying to do something so stupid as destroying all of humanity.
Thanks a lot, Ea: we owe you one.