Ibn Abbas said that this verse, "It is not for a prophet to act unfaithfully" [Al-Imran 3:161], was revealed concerning a red velvet cloak that went missing on the day of Badr. Some people said, "Perhaps the Messenger of Allah ﷺ took it." So Allah
revealed, "It is not for a prophet to act unfaithfully" [Al-Imran 3:161], to the end of the verse.
حدثنا قتيبة بن سعيد حدثنا عبد الواحد بن زياد حدثنا خصيف
قال ابن عباس رضي الله عنهما نزلت هذه الآية {وما كان لنبي أن يغل} في قطيفة حمراء فقدت يوم بدر فقال بعض الناس لعل رسول الله ﷺ أخذها فأنزل الله عز وجل {وما كان لنبي أن يغل} إلى آخر الآية
[Its chain of transmission is daif] Tirmidhi transmitted it in the tafsir of the Quran, chapter on Surah Al Imran, hadith no. 3009, from Qutayba, with this chain, and he said, "Hasan gharib." Some of the people: hypocrites, as in the narration of Wahidi. The hadith has corroborating narrations in Wahidi's Asbab al-Nuzul, p. 107, and elsewhere. See Tafsir Ibn Kathir, 1/430. Khaseef is daif.