(93) باب الصَّلَاةِ فِي الْكَعْبَةِ
'Abbas said "When the Prophet (ﷺ) came to Makkah he refused to enter the House (the Ka'bah) for there were idols in it. He ordered to take them out and they were taken out. The statues of Abraham and Isma'il were taken out and they had arrows in their hands. Apostle of Allaah(ﷺ) said "May Allaah destroy them! By Allaah, they knew that they never cast lots by arrow. He then entered the House(the Ka'bah) and uttered the takbir (Allaah is most great) in all its sides and corners. He then came out and did not pray.
Reference: Sunan Abi Dawud 2027
In-book reference: Book 11, Hadith 307
English translation: Book 10, Hadith 2022