Mujahid commented on Allah's statement,
﴿هُوَ الَّذِى خَلَقَ لَكُم مَّا فِى الاٌّرْضِ جَمِيعاً﴾
(He it is Who created for you all that is on earth) "Allah created the earth before heaven, and when He created the earth, smoke burst out of it. This is why Allah said,
﴿ثُمَّ اسْتَوَى إِلَى السَّمَآءِ وَهِىَ دُخَانٌ﴾
(Then He Istawa ila (turned towards) the heaven when it was smoke.) (41:11)
﴿فَسَوَّاهُنَّ سَبْعَ سَمَـوَاتٍ﴾
(And made them seven heavens) means, one above the other, while the `seven earths' means, one below the other.''
This Ayah testifies to the fact that the earth was created before heaven, as Allah has indicated in the Ayat in Surat As-Sajdah.