Hadith 4604

Ibn ‘Abbas reported God’s messenger as saying: “If anyone acquires a section of the science of the stars for a purpose other than what God has mentioned he has acquired a branch of magic. The astrologer is a kahin, the kahin is a magician, and the magician is an infidel.” Razin transmitted it.

وَعَنِ ابْنِ عَبَّاسٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنِ اقْتَبَسَ بَابًا مِنْ عِلْمِ النُّجُومِ لِغَيْرِ مَا ذَكَرَ اللَّهُ فَقَدِ اقْتَبَسَ شُعْبَةً مِنَ السِّحْرِ الْمُنَجِّمُ كَاهِنٌ والكاهنُ ساحرٌ والساحرُ كافرٌ» . رَوَاهُ رزين

Reference: 5646040
In-book reference: Book 23, Hadith 4604