It is related that Jabir ibn `Abd Allah said to the Prophet : "O Messenger of Allah, may my father and mother be sacrificed for you, tell me of the first thing Allah created before all things." He said: "O Jabir, the first thing Allah created was the light of your Prophet from His light, and that light remained (lit. "turned") in the midst of His Power for as long as He wished, and there was not, at that time, a Tablet or a Pen or a Paradise or a Fire or an angel or a heaven or an earth. And when Allah wished to create creation, he divided that Light into four parts and from the first made the Pen, from the second the Tablet, from the third the Throne, [and from the fourth everything else]."
at this point, we must also know that there are rigorously authenticated Hadiths found even in the SaHiHayn that the qalam or the pen was the one which was created first. shaykh `abd al-Haqq muHaddith discusses in his madarij an-nubuwwah, an excellent biography of the Prophet Sallallahu `alayhi wa sallam. he says at the outset, it seems difficult to reconcile but the very Hadiths which say that the qalam (Pen) was created first, continue to say: "Allah ta`ala commanded: 'write'. said the pen, 'what shall i write?'. Allah said: 'that which happened before and that which shall happen after'." [maa kaan wa maa yakuun] if the pen was created first such that nothing else was created before that, why was it commanded to write: 'that which happened?'. and indeed, it is not right to say Allah - for Allah subHanahu wa ta`ala is free from the constraints of 'before' and 'after'. it must also be pointed that ibrahim `alayhis salam said: 'ana awwalul muslimeen' 'i am the first of the muslims'; no doubt, muslims like sayyiduna nuH and sayyiduna adam alayhimusSalatu was salam were before the Khalil `alayhis salatu was salam. the saying is to emphasize that he is a prominent muslim. ponder. wallahu a`alam wa `ilmuhu atam.