The Islamic society has great ties to astronomy. Its main religious customs (start of the Islamic month, direction of prayer, and the five daily prayers) are all related to two main celestial objects: the Sun and the Moon. First, the start of any Islamic month is related to the actual seeing of the young crescent after the new Moon. Second, the direction of prayer, i.e., praying towards Mecca, is related to the determination of the zenith point in Mecca. Third, the proper time for the five daily prayers is related to the motion of the Sun. Everyone in the society is directly concerned by these customs. This is to say that the major impetus for the growth of Islamic astronomy came from these three main religious observances which presented an assortment of problems in mathematical astronomy. To observe these three customs, a new set of astronomical observations were needed and this helped the development of the Islamic observatory. There is a claim that it was first in Islam that the astronomical observatory came into real existence. The Islamic observatory was a product of needs and values interwoven into the Islamic society and culture. It is also considered as a true representative and an integral par of the Islamic civilisation. Since astronomy interested not only men of science, but also the rulers of the Islamic empire, several observatories have flourished. The observatories of Baghdad, Cairo, Córdoba, Toledo, Maragha, Samarqand and Istanbul acquired a worldwide reputation throughout the centuries. This paper will discuss the two most important observatories (Maragha and Samarqand) in terms of their instruments and discoveries that contributed to the establishment of these scientific institutions.