He heard the Messenger of Allah ﷺ say, "There is no man who claims someone other than his father as his father, knowing he is not, except that he has committed disbelief. Whoever claims what does not belong to him is not one of us, and let him take his seat in the Fire. Whoever calls a man a disbeliever, or says, 'Enemy of Allah,' when he is not so, it rebounds upon himself."In Bukhari's wording, "Whoever claims to belong to a people to whom he does not belong, let him take his seat in the Fire."
أنه سمع رسول الله ﷺ يقول: ليس من رجل ادعى لغير أبيه وهو يعلمه إلا كفر، ومن ادعى ما ليس له فليس منا، وليتبوأ مقعده من النار، ومن دعا رجلا بالكفر، أو قال: عدو الله وليس كذلك إلا حار عليه. وفي لفظ البخاري: ومن ادعى قوما ليس فيهم فليتبوأ مقعده من النار.
Muslim narrated it in the Book of Faith (61) from Zuhayr bin Harb, who said, Abdul-Samad bin Abdul-Warith told us, my father told us, Husayn the teacher told us, from Ibn Burayda, from Yahya bin Yamar, that Abu Aswad told him, from Abu Dharr, and he mentioned it.Bukhari narrated it in the Book of Virtues (3508) and the Book of Manners (6045) from Abu Muamar, from Abdul-Warith, with the same chain, but divided into parts.