Sahih Muslim , Hadith 679

Khufaf b. Ima' al-Ghifari reported that the Messenger of Allah aid in prayer: 0 Allah I curse the tribes of Lihyan, Ri'l, Dhakwan, and 'Usayya for they disobeyed Allah and His Messenger. Allah pardoned (the tribe of) Ghifar and Allah granted protection to (the tribe of) Aslam

حَدَّثَنِي أَبُو الطَّاهِرِ، أَحْمَدُ بْنُ عَمْرِو بْنِ سَرْحٍ الْمِصْرِيُّ قَالَ حَدَّثَنَا ابْنُ وَهْبٍ، عَنِ اللَّيْثِ، عَنْ عِمْرَانَ بْنِ أَبِي أَنَسٍ، عَنْ حَنْظَلَةَ بْنِ عَلِيٍّ، عَنْ خُفَافِ بْنِ إِيمَاءٍ الْغِفَارِيِّ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم فِي صَلاَةٍ ‏ "‏ اللَّهُمَّ الْعَنْ بَنِي لِحْيَانَ وَرِعْلاً وَذَكْوَانَ وَعُصَيَّةَ عَصَوُا اللَّهَ وَرَسُولَهُ غِفَارُ غَفَرَ اللَّهُ لَهَا وَأَسْلَمُ سَالَمَهَا اللَّهُ ‏" ‏ ‏.‏

sunnah.com

Khufaf b. Ima' reported that the Messenger of Allah (may peace he upon him), bowed (in prayer) and then lifted his head and then said: So far as the tribe of Ghifar is concerned, Allah had pardoned it, and Allah had granted protection to the tribe of Aslam, and as for the tribe of Usayya, It had disobeyed Allah and His Messenger, (and further said): O Allah! curse the tribe of Lihyan curse Ri'l, and Dhakwan, and then fell in prostration. It is after this that the cursing of the unbelievers got a sanction.

وَحَدَّثَنَا يَحْيَى بْنُ أَيُّوبَ، وَقُتَيْبَةُ، وَابْنُ، حُجْرٍ قَالَ ابْنُ أَيُّوبَ حَدَّثَنَا إِسْمَاعِيلُ، قَالَ أَخْبَرَنِي مُحَمَّدٌ، - وَهُوَ ابْنُ عَمْرٍو - عَنْ خَالِدِ بْنِ عَبْدِ اللَّهِ بْنِ حَرْمَلَةَ، عَنِ الْحَارِثِ بْنِ خُفَافٍ، أَنَّهُ قَالَ قَالَ خُفَافُ بْنُ إِيمَاءٍ رَكَعَ رَسُولُ اللَّهِ صلى الله عليه وسلم ثُمَّ رَفَعَ رَأْسَهُ فَقَالَ ‏ "‏ غِفَارُ غَفَرَ اللَّهُ لَهَا وَأَسْلَمُ سَالَمَهَا اللَّهُ وَعُصَيَّةُ عَصَتِ اللَّهَ وَرَسُولَهُ اللَّهُمَّ الْعَنْ بَنِي لِحْيَانَ وَالْعَنْ رِعْلاً وَذَكْوَانَ ‏" ‏ ‏.‏ ثُمَّ وَقَعَ سَاجِدًا ‏.‏ قَالَ خُفَافٌ فَجُعِلَتْ لَعْنَةُ الْكَفَرَةِ مِنْ أَجْلِ ذَلِكَ ‏.‏

sunnah.com

A hadith like this has been transmitted by Khufaf b. Ima' except this that he did not mention (these words): " cursing of unbelievers got a sanctions.

حَدَّثَنَا يَحْيَى بْنُ أَيُّوبَ، حَدَّثَنَا إِسْمَاعِيلُ، قَالَ وَأَخْبَرَنِيهِ عَبْدُ الرَّحْمَنِ بْنُ حَرْمَلَةَ، عَنْ حَنْظَلَةَ بْنِ عَلِيِّ بْنِ الأَسْقَعِ، عَنْ خُفَافِ بْنِ إِيمَاءٍ، ‏.‏ بِمِثْلِهِ إِلاَّ أَنَّهُ لَمْ يَقُلْ فَجُعِلَتْ لَعْنَةُ الْكَفَرَةِ مِنْ أَجْلِ ذَلِكَ ‏.‏

sunnah.com