When the Messenger of Allah ﷺ returned from Hudaybiyyah, this verse was revealed, "Indeed, We have given you a clear conquest, that Allah may forgive you what preceded of your sin and what will follow, and complete His favor upon you, and guide you to a straight path" [Fath 48:1–2].The Muslims said, "Messenger of Allah, blessed are you for what Allah has granted you. But what about us?"So Allah revealed, "That He may admit the believing men and believing women to gardens beneath which rivers flow, wherein they will abide eternally, and remove from them their misdeeds. And ever is that, in the sight of Allah, a great attainment" [Fath 48:5].
حدثنا يزيد أخبرنا همام عن قتادة
لما انصرف رسول الله ﷺ من الحديبية نزلت هذه الآية {إنا فتحنا لك فتحا مبينا ليغفر لك الله ما تقدم من ذنبك وما تأخر ويتم نعمته عليك ويهديك صراطا مستقيما} قال المسلمون يا رسول الله هنيئا لك ما أعطاك الله فما لنا فنزلت {ليدخل المؤمنين والمؤمنات جنات تجري من تحتها الأنهار خالدين فيها ويكفر عنهم سيئاتهم وكان ذلك عند الله فوزا عظيما}