Jami` at-Tirmidhi, Volume 6, Book 44, Hadith 3319 (DarusSalam) ⓘ
Abdul-Wahid bin Sulaim said: “I arrived in Makkah and met Ata bin Abi Rabah. I said: ‘O Abu Muhammad! Some people with us speak about Al-Qadar.’ Ata said: ‘I met Al-Walid bin Ubadah bin As-Samit and he said: “My father narrated to me, he said: ‘I heard the Messenger of Allah saying: “Verily the first of what Allah created was the Pen. He said to it: “Write.” So it wrote what will be forever.’”
حَدَّثَنَا يَحْيَى بْنُ مُوسَى، حَدَّثَنَا أَبُو دَاوُدَ الطَّيَالِسِيُّ، حَدَّثَنَا عَبْدُ الْوَاحِدِ بْنُ سُلَيْمٍ، قَالَ قَدِمْتُ مَكَّةَ فَلَقِيتُ عَطَاءَ بْنَ أَبِي رَبَاحٍ فَقُلْتُ لَهُ يَا أَبَا مُحَمَّدٍ إِنَّ أُنَاسًا عِنْدَنَا يَقُولُونَ فِي الْقَدَرِ . فَقَالَ عَطَاءٌ لَقِيتُ الْوَلِيدَ بْنَ عُبَادَةَ بْنِ الصَّامِتِ قَالَ حَدَّثَنِي أَبِي قَالَ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ " إِنَّ أَوَّلَ مَا خَلَقَ اللَّهُ الْقَلَمَ فَقَالَ لَهُ اكْتُبْ فَجَرَى بِمَا هُوَ كَائِنٌ إِلَى الأَبَدِ " . وَفِي الْحَدِيثِ قِصَّةٌ . قَالَ هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ غَرِيبٌ . وَفِيهِ عَنِ ابْنِ عَبَّاسٍ .
also referenced under: Hadith 3319 (Reference) & Book 47, Hadith 3637 (In-Book)