In Tablet VII of the Epic of Gilgamesh, the gods Anu, Enlil, Ea and Shamash decide that Enkidu should pay with his life for the deaths of Humbaba and the Bull of Heaven:
Enkidu began to speak to Gilgamesh: 'My brother, this night what a dream [I dreamed!] The gods Anu, Enlil, Ea and celestial Shamash [held assembly], and Anu spoke unto Enlil: "These, because they slew the Bull of Heaven, and slew Humbaba that [guarded] the mountains dense-[wooded] with cedar," so said Anu, "between these two [let one of them die!]"
'And Enlil said: "Let Enkidu die, but let not Gilgamesh die!"
'Celestial Shamash began to reply to the hero Enlil: "Was it not at your word that they slew him, the Bull of Heaven and also Humbaba? Now shall innocent Enkidu die?"
'Enlil was wroth at celestial Shamash: "How like a comrade you marched with them daily!'"
Source: The Epic of Gilgamesh, translated by Andrew George, Penguin Books
Why didn't the gods kill both Gilgamesh and Enkidu? And why did Enlil pick Enkidu instead of Gilgamesh?