All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
The earth was created before the heaven as the verses in Soorah Fussilat [Quran 41] indicate. As regards the sequence of the creation of the earth and the stellar bodies, there is no explicit text about it, but several texts provide that the stars and planets were added to the heaven and that they beautify it, as in the following verses:
- {And We have certainly beautified the nearest heaven with stars.} [Quran 67:5]
- {Indeed, We have adorned the nearest heaven with an adornment of stars.} [Quran 37:6]
- {And He completed them as seven heavens within two days and inspired in each heaven its command. And We adorned the nearest heaven with lamps and as protection. That is the determination of the Exalted in Might, the Knowing.} [Quran 41:12]
Ibn Katheer stated this in Al-Bidaayah wan-Nihaayah, saying:
“All the stellar bodies are in the lowest heaven, and some of them may be above the others, and evidence about this can be found in the words of Allaah…” [End of quote] and he mentioned the above verses.
This means that the stars and planets were created with the heaven (i.e. when the heavens were created) or later, so the earth would be older than those planets. However, there is no way to decisively assert this or otherwise.
Allaah Knows best.