Abdullah bin Amr bin As reported,

I heard the Messenger of Allah ﷺ say, "Allah عز وجل created His creation in darkness, then cast upon them some of His light. Whoever was struck by that light was guided, and whoever it missed went astray. That is why I say the pen has dried upon Allah's knowledge."

Tirmidhi 2642

Sahih

حدثنا الحسن بن عرفة حدثنا إسمعيل بن عياش عن يحيى بن أبي عمرو السيباني عن عبد الله بن الديلمي قال سمعت

عبد الله بن عمرو يقول

سمعت رسول الله ﷺ يقول إن الله عز وجل خلق خلقه في ظلمة فألقى عليهم من نوره فمن أصابه من ذلك النور اهتدى ومن أخطأه ضل فلذلك أقول جف القلم على علم الله

الترمذي 2642صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Faith
Chapter
Division of this Ummah
Numbering
Darussalam 2642
Tirmidhi 2642