Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said: The first of all things that Allah Almighty created was the Pen, and He said to it: Write. It said: O my Lord! What shall I write? Allah Almighty said: Write the decree (qadar). So it wrote everything that was to happen from that day until the Day of Resurrection. Ibn Abbas (may Allah be pleased with them both) said: Then Allah Almighty created the fish (Nun) and spread out the earth upon it. Thus vapour rose from the water, and from it the heavens were split apart. Then the fish moved, and the earth swayed and shook, so it was made firm and stable with the mountains; and for this reason the mountains boast over the earth until the Day of Resurrection.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17703