Imam Muhammad bin Sirin (may Allah have mercy on him)
Reference: (died 110 AH)
said:
«أول من قاس إبليس ، وما عبدت الشمس والقمر إلا بالمقابيس»
“The first to make qiyas (analogy) (against a clear text) was Iblis. The sun and the moon were worshipped only because of analogies.”
Reference: (Sunan al-Darimi 1/65, hadith 195, and its chain is hasan (good))