Amir bin Saad reported that during the expedition of Tabuk, people rushed eagerly toward the dwellings of the people of al-Hijr, entering their ruins. When this reached the Messenger of Allah ﷺ, he called out among the people, "Gather for prayer."Amir said, I came to the Messenger of Allah ﷺ while he was holding his camel, and he was saying, "Why are you entering upon a people upon whom Allah's anger descended?"A man from among them called out, "We marvel at them, Messenger of Allah."He replied, "Shall I not tell you of something more wondrous than that? A man from among yourselves informs you of what came before you and what will come after you. So stand firm and be upright, for Allah cares nothing for punishing you. A people will come who will be unable to defend themselves from anything."
عامر بن سعد، قال: لما كان في غزوة تبوك تسارع الناس إلى أهل الحجر يدخلون عليهم، فبلغ ذلك رسول الله ﷺ فنادى في الناس: الصلاة جامعة قال: فأتيت رسول الله ﷺ وهو ممسك بعيره، وهو يقول: ما تدخلون على قوم غضب الله عليهم؟ فناداه رجل منهم: نعجب منهم يا رسول الله. قال: أفلا أنبئكم بأعجب من ذلك؟ رجل من أنفسكم ينبئكم بما كان قبلكم، وما هو كائن بعدكم فاستقيموا وسددوا، فإن الله عز وجل لا يعبأ بعذابكم شيئا، وسيأتي قوم لا يدفعون عن أنفسهم بشيء.
It was narrated by Ahmad (18029), Tabarani (22/340-341), and Tahawi in his Mushkil (3741), all from the hadith of Masudi, from Ismail bin Awsat, from Muhammad bin Abu Kabsha, and he mentioned it, and the wording given is Ahmad's. Its isnad is hasan because of Muhammad bin Abu Kabsha, whom Ibn Hibban mentioned along with some of his descriptions, so it appears that he knew him and mentioned two narrators who transmitted from him. Ibn Kathir also graded its isnad hasan in Bidayah wa Nihayah (7/165).As for Masudi, he is Abdul-Rahman bin Abdullah bin Utbah al-Kufi, whose memory became confused toward the end of his life, but a group narrated from him, including those who narrated from him before that confusion set in.On this subject there are other hadiths as well, see Akhbar Nabi Allah Salih .