Suhayb reported,

The Messenger of Allah ﷺ was moving his lips during the days of Hunayn after the dawn prayer.They asked, "Messenger of Allah, you are moving your lips with something?"He replied, "A prophet from among those before you," then he mentioned a phrase whose meaning was, "was impressed by the great number of his followers and said, 'No one will ever be able to overcome these people.' So Allah revealed to him, 'Give your community a choice between one of three things. Either I will send against them an enemy from outside who will overpower them, or I will send famine upon them, or I will send death upon them.' They said, 'As for famine and the enemy, we have no strength to bear them, but death.' So death was sent upon them, and seventy thousand of them died in a single night."Then he said, "So I say, O Allah, by You I strive, by You I attack, and by You I fight."

Azami 8493

Sahih

عن صهيب

أن رسول الله ﷺ كان يحرك شفتيه أيام حنين بعد صلاة الفجر فقالوا: يا رسول الله إنك تحرك شفتيك بشيء؟ قال: إن نبيا ممن كان قبلكم- ثم ذكر كلمة معناها- أعجبته كثرة أمته فقال: لن يروم هؤلاء أحد بشيء فأوحى الله إليه أن خير أمتك بين إحدى ثلاث: أن أسلط عليهم عدوا من غيرهم فيستبيحهم، وإما أن أسلط عليهم الجوع، وإما أن أرسل عليهم الموت؟ فقالوا: أما الجوع والعدو فلا طاقة لنا بهما، ولكن الموت، فأرسل عليهم الموت فمات منهم في ليلة سبعون ألفا فأنا أقول: اللهم بك أحاول، وبك أصاول، وبك أقاتل.

الأعظمي 8493صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Stories of the prophets
Chapter
Reports about unnamed prophets
Section
Story of the prophet who was impressed by the great number of his nation
Numbering
Jami al-Kamil 8493 (2nd edition)
Azami 8493