حَدَّثَنَا أَحْمَدُ بْنُ يُونُسَ، حَدَّثَنَا عَاصِمُ بْنُ مُحَمَّدٍ، سَمِعْتُ أَبِي يَقُولُ، قَالَ ابْنُ عُمَرَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم لاَ يَزَالُ الأَمْرُ فِي قُرَيْشٍ مَا بَقِيَ مِنْهُمُ اثْنَانِ "
Narrated Ibn `Umar:
Allah's Messenger (ﷺ) said, "This matter (caliphate) will remain with the Quraish even if only two of them were still existing."
Reference: Sahih al-Bukhari 7140
In-book : Book 93, Hadith 4
USC-MSA web (English) : Vol. 9, Book 89, Hadith 254 (deprecated)