Sahih al-Bukhari, Volume 9, Book 89, Hadith 324 (USC-MSA) ⓘ
Narrated Al-Qasim bin Muhammad: `Aisha said, "O my head!" Allah's Messenger said, "If that (i.e., your death) should happen while I am still alive, I would ask Allah to forgive you and would invoke Allah for you." `Aisha said, "O my life which is going to be lost! By Allah, I think that you wish for my death, and if that should happen then you would be busy enjoying the company of one of your wives in the last part of that day." The Prophet said, "But I should say, 'O my head!' I feel like calling Abu Bakr and his son and appoint (the former as my successors lest people should say something or wish for something. Allah will insist (on Abu Bakr becoming a Caliph) and the believers will prevent (anyone else from claiming the Caliphate)," or "..Allah will prevent (anyone else from claiming the Caliphate) and the believers will insist (on Abu Bakr becoming the Caliph).
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، أَخْبَرَنَا سُلَيْمَانُ بْنُ بِلاَلٍ، عَنْ يَحْيَى بْنِ سَعِيدٍ، سَمِعْتُ الْقَاسِمَ بْنَ مُحَمَّدٍ، قَالَ قَالَتْ عَائِشَةُ ـ رضى الله عنها ـ وَارَأْسَاهْ. فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " ذَاكِ لَوْ كَانَ وَأَنَا حَىٌّ فَأَسْتَغْفِرُ لَكِ وَأَدْعُو لَكِ ". فَقَالَتْ عَائِشَةُ وَاثُكْلِيَاهْ وَاللَّهِ إِنِّي لأَظُنُّكَ تُحِبُّ مَوْتِي وَلَوْ كَانَ ذَاكَ لَظَلِلْتَ آخِرَ يَوْمِكَ مُعَرِّسًا بِبَعْضِ أَزْوَاجِكَ. فَقَالَ النَّبِيُّ صلى الله عليه وسلم " بَلْ أَنَا وَارَأْسَاهْ لَقَدْ هَمَمْتُ ـ أَوْ أَرَدْتُ ـ أَنْ أُرْسِلَ إِلَى أَبِي بَكْرٍ وَابْنِهِ فَأَعْهَدَ أَنْ يَقُولَ الْقَائِلُونَ أَوْ يَتَمَنَّى الْمُتَمَنُّونَ ". ثُمَّ قُلْتُ يَأْبَى اللَّهُ وَيَدْفَعُ الْمُؤْمِنُونَ، أَوْ يَدْفَعُ اللَّهُ وَيَأْبَى الْمُؤْمِنُونَ.
also referenced under: Book 93, Hadith 77 (In-Book) & Hadith 7217 (DarusSalam)