The polytheists said, "Muhammad, describe your Lord's lineage to us." So Allah revealed , "Say, He is Allah, the One. Allah, the Eternal Refuge" [Ikhlas 112:1–2].He explained that the Eternal Refuge is the One who neither begets nor was begotten, and there is none comparable to Him, because nothing is born except that it will die, and nothing dies except that it will be inherited from, and Allah neither dies nor is inherited from.Concerning "He neither begets nor was begotten" [Ikhlas 112:3], he said that He has no likeness and no equal, and there is nothing like Him.
إن المشركين قالوا: يا محمد انسب لنا ربك، فأنزل الله عز وجل: {قل هو الله أحد الله الصمد} قال: الصمد الذي لم يلد ولم يولد، ولم يكن له كفوا أحد؛ لأنه ليس شيء يولد إلا سيموت، وليس شيء يموت إلا سيورث، وإن الله لا يموت ولا يورث {لم يلد ولم يولد} قال: لم يكن له شبيه ولا عدل، وليس كمثله شيء.
Reported by Tirmidhi (3364), Ahmad (21219), and Hakim (2/540), all of them from the hadith of Abu Jafar Razi, from Rabi bin Anas, from Abu Aliyah, from Ubayy bin Kaab, who narrated it. The wording is Hakim's, and he said, "sahih in its chain of transmission." Its chain of transmission is hasan because of Abu Jafar Razi, for his hadith is hasan, and the discussion of him is treated at length in the Book of Faith.