The Prophet (may Allah's peace and blessings be upon him) points out that if a person acquires knowledge of the stars and planets and uses their movements and entry and exit as guidance for earthly events, like the birth of someone or his demise or illness, or any other future incident, he has thus learned part of magic, and the more he acquires of it, the more magic he learns.