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."
أن رسول الله ﷺ كان يحرك شفتيه أيام حنين بعد صلاة الفجر فقالوا: يا رسول الله إنك تحرك شفتيك بشيء؟ قال: إن نبيا ممن كان قبلكم- ثم ذكر كلمة معناها- أعجبته كثرة أمته فقال: لن يروم هؤلاء أحد بشيء فأوحى الله إليه أن خير أمتك بين إحدى ثلاث: أن أسلط عليهم عدوا من غيرهم فيستبيحهم، وإما أن أسلط عليهم الجوع، وإما أن أرسل عليهم الموت؟ فقالوا: أما الجوع والعدو فلا طاقة لنا بهما، ولكن الموت، فأرسل عليهم الموت فمات منهم في ليلة سبعون ألفا فأنا أقول: اللهم بك أحاول، وبك أصاول، وبك أقاتل.
Ahmad (18933), Nasai in Kubra (8579) with this wording, Tirmidhi (3340) in abridged form, and Ibn Hibban (1975) all narrated it through various chains from Thabit Bunani, from Abdul-Rahman bin Abu Layla, from Suhayb, who mentioned it. Tirmidhi added at the end the story of the People of the Ditch. Its chain of transmission is sahih. Tirmidhi said, "This is a hasan gharib hadith."