Sahih al-Bukhari 3501
Book 61: Virtues and Merits of the Prophet (pbuh) and his Companions · Narrated by Ibn `Umar
Arabic
حَدَّثَنَا أَبُو الْوَلِيدِ، حَدَّثَنَا عَاصِمُ بْنُ مُحَمَّدٍ، قَالَ سَمِعْتُ أَبِي، عَنِ ابْنِ عُمَرَ ـ رضى الله عنهما ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " لا يَزَالُ هَذَا الأَمْرُ فِي قُرَيْشٍ، مَا بَقِيَ مِنْهُمُ اثْنَانِ ".
English translation
Narrated Ibn `Umar:The Prophet (ﷺ) said, "Authority of ruling will remain with Quraish, even if only two of them remained
Reference: Sahih al-Bukhari 3501, Book of Virtues and Merits of the Prophet (pbuh) and his Companions. English translation by Dr. Muhammad Muhsin Khan.