كتاب الفتن وأشراط الساعة
54  
The Book of Tribulations and Portents of the Last Hour
(18)
Chapter: The Hour Will Not Begin Until A Man Passes By Another Man's Grave And Wishes That He Was In The Place Of The Deceased, Because Of Calamity
(18)
بَاب لَا تَقُومُ السَّاعَةُ حَتَّى يَمُرَّ الرَّجُلُ بِقَبْرِ الرَّجُلِ فَيَتَمَنَّى أَنْ يَكُونَ مَكَانَ الْمَيِّتِ مِنْ الْبَلَاءِ
Sahih Muslim 2917

Abu Huraira reported that Allah's Apostle (ﷺ) as saying:

This tribe of the Quraish would kill (people) of my Ummah. They (the Companions) said: What do you command us to do (in such a situation)? Thereupon he said: Would that the people remain aside from them (and not besmear their hands with the blood of the Muslim).

This hadith has been narrated on the authority of Shu'ba with the same chain of transmitters.

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا أَبُو أُسَامَةَ، حَدَّثَنَا شُعْبَةُ، عَنْ أَبِي التَّيَّاحِ، قَالَ سَمِعْتُ أَبَا زُرْعَةَ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏"‏ يُهْلِكُ أُمَّتِي هَذَا الْحَىُّ مِنْ قُرَيْشٍ ‏"‏ ‏.‏ قَالُوا فَمَا تَأْمُرُنَا قَالَ ‏"‏ لَوْ أَنَّ النَّاسَ اعْتَزَلُوهُمْ ‏"‏ ‏.‏

وَحَدَّثَنَا أَحْمَدُ بْنُ إِبْرَاهِيمَ الدَّوْرَقِيُّ، وَأَحْمَدُ بْنُ عُثْمَانَ النَّوْفَلِيُّ، قَالاَ حَدَّثَنَا أَبُو دَاوُدَ حَدَّثَنَا شُعْبَةُ، فِي هَذَا الإِسْنَادِ فِي مَعْنَاهُ ‏.‏

Reference : Sahih Muslim 2917
In-book reference : Book 54, Hadith 91
USC-MSA web (English) reference : Book 41, Hadith 6971
  (deprecated numbering scheme)