Centuries earlier, the peoples of the Near East already had this story, as reported in the Enuma Elish, where the god Ea makes humanity from the dirt of the earth:
This myth was widespread, appearing also in ancient Greece, likely a transfer from the Near East, probably during the Orientalizing Period, the great period of contact with Near Eastern cultures. It is not seen in Hesiod or Homer and therefore is a relatively late transfer. References can be found in Sappho, Aesop, Plato, and others, and Apollodorus includes the story in his Library: “Prometheus moulded men out of water and earth and gave them also fire, which, unknown to Zeus, he had hidden in a stalk of fennel” (1.7.1).
In the Babylonian creation myth, human beings were the creation of the gods, made from the earth just as in Genesis. However, the Babylonian version differs in two essential respects from the Hebrew version. First, the Babylonian creation envisions human beings as given life through the blood of a god, not from the breath of a god. Second, the Babylonians envisioned humanity as a slave race created to serve and service the gods, while the Hebrews envisioned humanity as the pinnacle of God’s creation, made as the lords of the earth (Genesis 1:26). The Babylonians may have been born of their god’s blood, but the Hebrews saw themselves as nearly equal to God, perhaps too close.
As with the twin stories of Moses and Sargon of Akkad, the two somewhat contradictory Genesis accounts of creation (in chapters 1 and 2) repurpose a common Near Eastern myth, turning it on its head to define the Israelites in opposition to other Near Eastern peoples.