Some medieval Muslims took a keen interest in the study of astrology, despite the Islamic prohibitions (The Quran, points to the primary purpose of astrology as a means of providing physical guidance/navigation for an adherent, essentially considering its use in the capacity of horoscopes as forbidden.)partly because they considered the celestial bodies to be essential, partly because the dwellers of desert-regions often travelled at night, and relied upon knowledge of the constellations for guidance in their journeys. After the advent of Islam, the Muslims needed to determine the time of the prayers, the direction of the Kaaba, and the correct orientation of the mosque, all of which helped give a religious impetus to the study of astronomy and contributed towards the belief that the heavenly bodies were influential upon terrestrial affairs as well as the human condition. The science dealing with such influences was termed astrology (Arabic: علم النجوم Ilm an-Nujūm), a discipline contained within the field of astronomy (more broadly known as علم الفلك Ilm al-Falak 'the science of formation [of the heavens]'). The principles of these studies were rooted in Arabian, Persian, Babylonian, Hellenistic and Indian traditions and both were developed by the Arabs following their establishment of a magnificent observatory and library of astronomical and astrological texts at Baghdad in the 8th century.
Throughout the medieval period the practical application of astrology was subject to deep philosophical debate by Muslim religious scholars and scientists. Astrological prognostications nevertheless required a fair amount of exact scientific expertise and the quest for such knowledge within this era helped to provide the incentive for the study and development of astronomy.
Medieval Islamic astrology and astronomy continued Hellenistic and Roman era traditions based on Ptolemy's Almagest. Centres of learning in medicine and astronomy/astrology were set up in Baghdad and Damascus, and the Caliph Al-Mansur of Baghdad established a major observatory and library in the city, making it the world's astronomical centre. During this time knowledge of astronomy was greatly increased. Many modern star names are derived from their Arabic names.
Albumasur or Abu Ma'shar (805 - 885) was one of the most influential Islamic astrologers. His treatise Introductorium in Astronomiam (Kitab al-Mudkhal al-Kabīr) spoke of how '"only by observing the great diversity of planetary motions can we comprehend the unnumbered varieties of change in this world". The Introductorium was one of the first books to find its way in translation through Spain and into Europe in the Middle Ages, and was highly influential in the revival of astrology and astronomy there.
Persians also combined the disciplines of medicine and astrology by linking the curative properties of herbs with specific zodiac signs and planets. Mars, for instance, was considered hot and dry and so ruled plants with a hot or pungent taste, like hellebore, tobacco or mustard. These beliefs were adopted by European herbalists like Culpeper right up until the development of modern medicine.
The Persians also developed a system, by which the difference between the ascendant and each planet of the zodiac was calculated. This new position then became a 'part' of some kind. For example, the 'part of fortune' is found by taking the difference between the sun and the ascendant and adding it to the moon. If the 'part' thus calculated was in the 10th House in Libra, for instance, it suggested that money could be made from some kind of partnership.
The calendar introduced by Omar Khayyam, based on the classical zodiac, remains in effect in Afghanistan and Iran as the official Solar Hijri calendar.
Another notable Persian astrologer and astronomer was Qutb al-Din al Shirazi born in Iran, Shiraz (1236–1311). He wrote critiques of Ptolemy's Almagest and produced two prominent works on astronomy: 'The Limit of Accomplishment Concerning Knowledge of the Heavens' in 1281 and 'The Royal Present' in 1284, both of which commented upon and improved on Ptolemy's work, particularly in the field of planetary motion.
Ulugh Beyg was a fifteenth-century Timurid Sultan and also a mathematician and astronomer. He built an observatory in 1428 and produced the first original star map since Ptolemy, which corrected the position of many stars and included many new ones.
Some of the principles of astrology were refuted by several medieval Islamic astronomers such as Al-Farabi (Alpharabius), Ibn al-Haytham (Alhazen), Avicenna, Abu Rayhan al-Biruni and Averroes. Their reasons for refuting astrology were often due to both scientific (the methods used by astrologers being conjectural rather than empirical) and religious (conflicts with orthodox Islamic scholars) reasons. However these refutations mainly concerned the judicial branches of astrology rather than the natural principles of it. For example, Avicenna's refutation of astrology (in the treatise titled Resāla fī ebṭāl aḥkām al-nojūm, Treatise against the rulings of the stars) revealed support for its overarching principles. He stated that it was true that each planet had some influence on the earth, but his argument was the difficulty of astrologers being able to determine the exact effect of it. In essence, Avicenna did not refute astrology, but denied man's limited capacity to be able to know the precise effects of the stars on the sublunar matter. With that, he did not refute the essential dogma of astrology, but only refuted our ability to fully understand it.
Another Damascene scientist Ibn Qayyim Al-Jawziyya (1292–1350), in his Miftah Dar al-Sa'adah, used empirical arguments in astronomy in order to refute the judicial practice of astrology which is most closely aligned to divination. He recognized that the stars are much larger than the planets, and thus argued:
And if you astrologers answer that it is precisely because of this distance and smallness that their influences are negligible, then why is it that you claim a great influence for the smallest heavenly body, Mercury? Why is it that you have given an influence to al-Ra's and al-Dhanab, which are two imaginary points [ascending and descending nodes]?
Al-Jawziyya also recognized the Milky Way galaxy as "a myriad of tiny stars packed together in the sphere of the fixed stars" and thus argued that "it is certainly impossible to have knowledge of their influences."
According to most contemporary Islamic jurists, while the study of astronomy (ilm al-hay'ah) is lawful, astrology is not. Astronomy is useful in determining the beginning and end of the lunar months, e.g., that of Ramadan, in predicting the beginning of seasons, determining the direction of salat (prayer), and navigation; astrology is considered haram (forbidden), as knowledge of the future, of the Unseen is known only by Allah (God). Dr. Husam al-Din Ibn Musa `Afana, a Professor of the Principles of Fiqh at Al-Quds University, Palestine, states the following:
"First of all, it is worth noting that the Persians knew astronomy a long time ago. They would predict time through observing the movements of stars. These terms are astronomy and astrology. Astronomy is the science that deals with studying the movements of the celestial bodies and reducing observations to mathematical order. That science is useful in determining time, seasons, the direction of Prayer, etc. Astrology, on the other hand, is concerned with studying the positions and aspects of celestial bodies in the belief that they have an influence on the course of natural earthly occurrences and human affairs. Astrologists believe that the movements of stars have an influence on people's lives. Both Muslim astronomers and [religious] scholars refuse the prophecies of astrologists."
The Turkish government-sponsored Diyanet Vakfı, which represents the official Sunni view, likewise draws a distinction between astronomy and astrology, identifying the latter with non-Islamic influences on Arab culture, specifically Sabean and Hindu astrology. Astrology is seen as unscientific and conducive of a view of humans as helpless in the face of natural forces. Amongst the general population, however, astrology is popular, with most major newspapers running astrology columns.
Most scholars believe that astrology is a prohibited field of study. Imam Ibn Taymiyah stated: “Astrology that is concerned with studying the positions and aspects of celestial bodies in the belief that they have an influence on the course of natural earthly occurrences and human affairs is prohibited by the Quran, the Sunnah, and the unanimous agreement of the Muslim scholars. Furthermore, astrology was considered forbidden by all Messengers of Almighty Allah."
Saudi scholar Muhammad ibn al Uthaymeen is reported to have declared Astrology to be forbidden sorcery and fortune-telling.