One night Abraham left his house to go to a mountain. He walked alone in the dark until he chose a cave in the mountain, where he sat resting his back against its wall. He looked at the sky. He had hardly seen it when he remembered that he was looking at planets and stars which were worshipped by some people on earth. His young heart was filled with tremendous pain. He considered what was beyond the moon, the stars and the planets (i.e. Allah) and was astonished that these celestial bodies were worshipped by men when they had been created to worship and obey their Creator, appearing and disappearing at His command.
Therefore, Abraham addressed his people who worshipped celestial bodies, as Almighty Allah revealed: Thus did We show Abraham the kingdom of the heavens and the earth that he be one of those who have Faith with certainty. When the night covered him over with darkness he saw a star. He said: "This is my lord." But when it set, he said: "I like not those that set." When he saw the moon rising up he said: "This is my lord." But when it set he said: "Unless my Lord guides me, I shall surely be among the erring people." When he saw the sun rising up, he said: "This is my lord. This is greater." But when it set, he said: "0 my people! I am indeed free from all that you join as partners in worship with Allah. Verily, I have turned my face towards Him Who has created the heavens and the earth Hanifan (Islamic Monotheism, i.e., worshipping none but Allah Alone) and I am not of Al-Mushrikeen (those who worship others besides Allah)." Surah 6: 75-79