Abu Jahl said, "O Allah, if this is indeed the truth from You, then rain down stones upon us from the sky, or bring upon us a painful punishment" [Anfal 8:32]. So the following was revealed, "But Allah would not punish them while you were among them, nor would Allah punish them while they seek forgiveness. And why should Allah not punish them when they bar people from Masjid al-Haram" [Anfal 8:33–34].
قال أبو جهل: {اللهم إن كان هذا هو الحق من عندك فأمطر علينا حجارة من السماء أو ائتنا بعذاب أليم} [الأنفال: ٣٢]، فنزلت: {وما كان الله ليعذبهم وأنت فيهم وما كان الله معذبهم وهم يستغفرون وما لهم ألا يعذبهم الله وهم يصدون عن المسجد الحرام} [الأنفال: ٣٣- ٣٤].
Muslim narrated it in "The Characteristics of the Hypocrites" (2796), from Ubaydullah bin Muaz Anbari, who said, my father narrated to us, from Shubah, from Abdul-Hameed Ziyadi, that he heard Anas bin Malik say what has already been mentioned. Bukhari also narrated it in the tafsir, from Ahmad (4648) and from Muhammad bin Nadr (4649), both of them from Ubaydullah bin Muaz Anbari with his chain of transmission, similarly.