Abu Hurairah reported,

I heard the Messenger of Allah ﷺ say, "An ant bit one of the prophets, so he ordered the ant colony to be burned. Then Allah revealed to him, 'Because a single ant bit you, you have destroyed an entire community from among the communities that glorify Allah.'"

Bukhari 3019

Sahih

حدثنا يحيى بن بكير حدثنا الليث عن يونس عن ابن شهاب عن سعيد بن المسيب وأبي سلمة أن

أبا هريرة رضي الله عنه قال

سمعت رسول الله ﷺ يقول قرصت نملة نبيا من الأنبياء فأمر بقرية النمل فأحرقت فأوحى الله إليه أن قرصتك نملة أحرقت أمة من الأمم تسبح

البخاري 3019صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Jihad and expeditions
Chapter
If a polytheist burns a Muslim, should he be burned
Numbering
Darussalam 3019
Bukhari 3019