Sahih al-Bukhari, Hadith 505

Narrated Nafi`: `Abdullah bin `Umar said, "Allah's Messenger entered the Ka`ba along with Usama bin Zaid, Bilal and `Uthman bin Talha Al-Hajabi and closed the door and stayed there for some time. I asked Bilal when he came out, 'What did the Prophet do?' He replied, 'He offered prayer with one pillar to his left and one to his right and three behind.' In those days the Ka`ba was supported by six pillars." Malik said: "There were two pillars on his (the Prophet's) right side."

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، قَالَ أَخْبَرَنَا مَالِكٌ، عَنْ نَافِعٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم دَخَلَ الْكَعْبَةَ وَأُسَامَةُ بْنُ زَيْدٍ وَبِلاَلٌ وَعُثْمَانُ بْنُ طَلْحَةَ الْحَجَبِيُّ فَأَغْلَقَهَا عَلَيْهِ وَمَكَثَ فِيهَا، فَسَأَلْتُ بِلاَلاً حِينَ خَرَجَ مَا صَنَعَ النَّبِيُّ صلى الله عليه وسلم قَالَ جَعَلَ عَمُودًا عَنْ يَسَارِهِ، وَعَمُودًا عَنْ يَمِينِهِ، وَثَلاَثَةَ أَعْمِدَةٍ وَرَاءَهُ، وَكَانَ الْبَيْتُ يَوْمَئِذٍ عَلَى سِتَّةِ أَعْمِدَةٍ، ثُمَّ صَلَّى‏.‏ وَقَالَ لَنَا إِسْمَاعِيلُ حَدَّثَنِي مَالِكٌ وَقَالَ عَمُودَيْنِ عَنْ يَمِينِهِ‏.‏

sunnah.com