Ayesha reported,

The Messenger of Allah ﷺ, while he was still in good health, used to say, "No prophet is ever taken in death until he is shown his place in Paradise and then given the choice."When his final illness came upon him and his head was resting on my thigh, he lost consciousness for a while, then he came to. He fixed his gaze upward toward the ceiling and said, "O Allah, the highest companionship."I said to myself, "Then he is not choosing us," and I knew that this was the matter he had been telling us about while he was healthy.She said, those were the last words he spoke, "O Allah, the highest companionship."

Bukhari 6348

Sahih

حدثنا سعيد بن عفير قال حدثني الليث قال حدثني عقيل عن ابن شهاب أخبرني سعيد بن المسيب وعروة بن الزبير في رجال من أهل العلم أن

عائشة رضي الله عنها قالت

كان رسول الله ﷺ يقول وهو صحيح لن يقبض نبي قط حتى يرى مقعده من الجنة ثم يخير فلما نزل به ورأسه على فخذي غشي عليه ساعة ثم أفاق فأشخص بصره إلى السقف ثم قال اللهم الرفيق الأعلى قلت إذا لا يختارنا وعلمت أنه الحديث الذي كان يحدثنا وهو صحيح قالت فكانت تلك آخر كلمة تكلم بها اللهم الرفيق الأعلى

البخاري 6348صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Supplications
Chapter
Prophet's ﷺ supplication, "O Allah, the highest companion"
Numbering
Darussalam 6348
Bukhari 6348