Ibn Sirin said: The first to use analogy (qiyas) was Iblis, and the sun and the moon too were worshipped because of analogy.