Sahih Muslim , Book 30, Hadith 5674 (USC-MSA) ⓘ
Abu Huraira reported Allah's Messenger as saying: The similitude of mine and that of the Apostles before me is that of a person who built a house quite imposing and beautiful and he made it complete but for one brick in one of its corners. People began to walk round it, and the building pleased them and they would say: But for this brick your building would have been perfect. Muhammad said: And I am that final brick.
وَحَدَّثَنَا مُحَمَّدُ بْنُ رَافِعٍ، حَدَّثَنَا عَبْدُ الرَّزَّاقِ، حَدَّثَنَا مَعْمَرٌ، عَنْ هَمَّامِ بْنِ مُنَبِّهٍ، قَالَ هَذَا مَا حَدَّثَنَا أَبُو هُرَيْرَةَ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم . فَذَكَرَ أَحَادِيثَ مِنْهَا وَقَالَ أَبُو الْقَاسِمِ صلى الله عليه وسلم " مَثَلِي وَمَثَلُ الأَنْبِيَاءِ مِنْ قَبْلِي كَمَثَلِ رَجُلٍ ابْتَنَى بُيُوتًا فَأَحْسَنَهَا وَأَجْمَلَهَا وَأَكْمَلَهَا إِلاَّ مَوْضِعَ لَبِنَةٍ مِنْ زَاوِيَةٍ مِنْ زَوَايَاهَا فَجَعَلَ النَّاسُ يَطُوفُونَ وَيُعْجِبُهُمُ الْبُنْيَانُ فَيَقُولُونَ أَلاَّ وَضَعْتَ هَا هُنَا لَبِنَةً فَيَتِمَّ بُنْيَانُكَ " . فَقَالَ مُحَمَّدٌ صلى الله عليه وسلم " فَكُنْتُ أَنَا اللَّبِنَةَ " .
also referenced under: Book 43, Hadith 23 (In-Book) & Hadith 2286 (Reference)