Sunan Abi Dawud, Hadith 2022

‘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.

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

sunnah.com

also referenced under: Hadith 2027 (DarusSalam)