Hadithcore
Sahih Muslim, 2296 b
sahih

Uqba b. 'Amir reported Allah's Messenger (ﷺ) as saying:

Allah's Messenger (ﷺ) offered prayer over those who had fallen matyrs at Uhud. He then climbed the pulpit as if someone is saying good-bye to the living and the dead, and then said: I shall be there as your predecesor on the Cistern before you, and it is as wide as the distance between Aila and Juhfa (Aila is at the top of the gulf of 'Aqaba). I am not afraid that you would associate anything with Allah after me, but I am afraid that you may be (allured) by the world and (vie) with one another (in possessing material wealth) and begin killing one another, and you would be destroyed as were destroyed those who had gone before you. 'Uqba said that that was the last occasion that he saw Allah's Messenger on the pulpit.

وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا وَهْبٌ، - يَعْنِي ابْنَ جَرِيرٍ - حَدَّثَنَا أَبِي قَالَ، سَمِعْتُ يَحْيَى بْنَ أَيُّوبَ، يُحَدِّثُ عَنْ يَزِيدَ بْنِ أَبِي حَبِيبٍ، عَنْ مَرْثَدٍ، عَنْ عُقْبَةَ بْنِ عَامِرٍ، قَالَ صَلَّى رَسُولُ اللَّهِ صلى الله عليه وسلم عَلَى قَتْلَى أُحُدٍ ثُمَّ صَعِدَ الْمِنْبَرَ كَالْمُوَدِّعِ لِلأَحْيَاءِ وَالأَمْوَاتِ فَقَالَ ‏

‏ إِنِّي فَرَطُكُمْ عَلَى الْحَوْضِ وَإِنَّ عَرْضَهُ كَمَا بَيْنَ أَيْلَةَ إِلَى الْجُحْفَةِ إِنِّي لَسْتُ أَخْشَى عَلَيْكُمْ أَنْ تُشْرِكُوا بَعْدِي وَلَكِنِّي أَخْشَى عَلَيْكُمُ الدُّنْيَا أَنْ تَنَافَسُوا فِيهَا وَتَقْتَتِلُوا فَتَهْلِكُوا كَمَا هَلَكَ مَنْ كَانَ قَبْلَكُمْ ‏

‏ ‏.‏ قَالَ عُقْبَةُ فَكَانَتْ آخِرَ مَا رَأَيْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم عَلَى الْمِنْبَرِ ‏.‏

References2 variants
In-Book Reference
Book 43, Hadith 38
USC-MSA web (English) reference
Book 30, Hadith 5689 (deprecated numbering scheme)