Suwaʿ, Yaghūth, Yaʿūq, and Nasr.’
Ibn ʿAbbās—together with other early authorities—said: “These were righteous men from Noah’s people. When they died, their community lingered at their graves; later they fashioned their images and eventually worshipped them. That was the first step toward idolatry.”
For this reason the Prophet ﷺ forbade turning graves into places of prayer, closing the door that leads to polytheism (shirk), just as he forbade performing the prescribed prayer at sunrise or sunset. At those very moments the idolaters prostrate to the sun, and Satan accompanies it as it rises and as it sets; praying then would resemble the prayer of the polytheists. Thus that avenue was blocked.
Satan misguides the children of Adam to the extent that he is able. Whoever worships the sun, the moon, or the stars and calls upon them—as do those devoted to the heavenly bodies—will find that a devil descends upon him, addresses him, and informs him of certain things. They style this ‘the spirit of the stars’; in reality it is only a devil. And though Satan may help a person achieve some of his aims, he harms him many times more than he benefits him, and the ultimate fate of anyone who obeys him is evil—unless Allah turns to him in forgiveness.