Ibn Masud and other companions of the Prophet said that Allah the Almighty sent Gabriel onto the earth to get Him clay therefrom. The earth said: "I seek refuge in Allah from your decreasing my quantity or disfiguring me." So Gabriel returned and did not take anything. And he said: "My Lord, the land sought refuge in You, and it was granted."
So Allah sent Michael for the same purpose, and the land sought refuge with Allah and it was granted. So he went back and said to Allah what Gabriel had said before him.
Then Allah sent the Angel of Death, and the land sought refuge in Allah. The angel said: "I also seek refuge with Allah from returning without carrying out His command." So he took clay from the face of the earth and mixed it. He did not take from one particular place, but rather he took white, red, and black clay (from different places).
The Angel of Death ascended with it, and He (Allah) soaked the clay till it became sticky. Then Allah said to the angels: "Truly, I am going to create man from clay. So when I have fashioned him and breathed into him (his) soul created by Me. Then you fall down prostrate to him. Surah 38: 71-72