(Gen. 1:1:) IN THE BEGINNING GOD CREATED THE HEAVENS AND THE EARTH. It is written (in Ps. 104:3): WHO ROOFS HIS UPPER ROOMS IN THE WATERS, WHO SETS THE CLOUDS AS HIS CHARIOT…. R. Johanan said: Heaven and earth were created on the first day, and on the second the Holy One created the firmament and the angels. Where is it shown that they were created on the second day?
Where it is stated: WHO ROOFS HIS UPPER ROOMS IN THE WATERS, WHO SETS THE CLOUDS AS HIS CHARIOT, WHO WALKS ON THE WINGS OF THE WIND. And what is written next? WHO MAKES HIS ANGELS SPIRITS. R. Hanina said: The angels were created on the fifth day.
Thus it is written concerning the fifth: AND LET FOWL FLY ABOVE THE EARTH. Now the word ye'ofef only refers to the flying of angels, as it is used: AND WITH TWO HE DID FLY. And why were the angels not created on the first day? So that the heretics would not say: Michael was standing in the north with Gabriel in the south, and together they spread out the heavens and the earth.
So who did create them? The Holy One by himself, as stated: IN THE BEGINNING GOD CREATED THE HEAVENS AND THE EARTH. R. Judah and R. Nehemiah disagree. R. Judah says: The world was being created for six days. That is R. Judah's opinion, but R. Nehemiah says: The whole world was created on the first day.