Prophet Ibrahim (a.s), in explaining and propagating the concept of monotheism, found himself in persistent conflict with the idolaters – who possessed idols and statues, and the star-worshippers – who claimed Allah-ship for the sun, moon and the stars, and ascribed them as partners to Allah. In Babylon and Carrhae, Ibrahim’s second place of migration, they had even constructed temples and figures in the names of stars, and used to worship them!
In connection with his debate with the star-worshippers it has been narrated that once, when the darkness of the night had spread itself over the horizon and Venus had manifested itself, he (a.s) said: “This is my Lord!” When it had set he (a.s) started out in search of it but when he failed to find it, he said to the star-worshippers: “I do not love the Allahs that set.”
Then he saw the moon rise whereupon he (a.s) said to the people: “This is my Lord,” but when it disappeared from sight, he (a.s) said: “If my Lord does not guide me I shall surely be of the deviated ones.”
When the sun rose he (a.s) said: “This is my Lord,” but when it set (too) he distanced himself from the beliefs of the disbelievers and polytheists and declared: “I turn my heart and direct my worship towards He, Who has created the heavens and the earth, and I am not of the polytheists. Do you dispute me with respect to the One Allah, who has guided me aright? I fear not those, whom you regard as partners to Him.”( Tarikh-e-Anbiya, vol. 1, pg. 134 )