Sunan Abi Dawud, Hadith 2023

Narrated Aisha, Ummul Mu'minin: I liked to enter the House (the Ka'bah) and pray therein. The Messenger of Allah caught me by hand and admitted me to al-Hijr. He then said: Pray in al-Hijr when you intend to enter the House (the Ka'bah), for it is a part of the House (the Ka'bah). Your people shortened it when they built the Ka'bah, and they took it out of the House.

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

sunnah.com