When the Messenger of Allah ﷺ arrived in Mecca, he refused to enter the House while the idols were inside it, so he ordered them to be taken out. They brought out a depiction of Ibrahim and Ismail with divining arrows in their hands.The Prophet ﷺ said, "May Allah destroy them. By Allah, they knew that these two never sought lots through divining arrows."Then he entered the House and pronounced the takbir in its corners and came out without praying inside it.
أن رسول الله ﷺ لما قدم مكة أبي أن يدخل البيت وفيه الآلهة، فأمر بها فأخرجت، فأخرج صورة إبراهيم وإسماعيل في أيديهما من الأزلام فقال النبي ﷺ: قاتلهم الله، لقد علموا ما استقسما بهما قط ثم دخل البيت فكبر في نواحي البيت وخرج ولم يصل فيه.
Bukhari narrated it in the Book of Military Expeditions (4288) from Ishaq (that is, Ibn Mansur), who said, Abdul-Samad (that is, Ibn Abdul-Warith) narrated to us, who said, my father narrated to me, Ayub narrated to me, from Ikrima, from Ibn Abbas, who said, and then he mentioned it.The azlam were arrows that the Arabs during the pre-Islamic period used to write on some of them "do it" and on others "do not do it," and they would place them in a container. When one of them wanted to do something, he would put his hand in and draw out an arrow. If the one bearing the command came out, he would proceed with his intention, and if the one bearing the prohibition came out, he would refrain.