Egyptian astronomy started in prehistoric times, in the Predynastic Period. In the 5th millennium BCE, the stone circles at Nabta Playa may have made use of astronomical alignments. By the time the historical Dynastic Period began in the 3rd millennium BCE, the 365 day period of the Egyptian calendar was already in use, and the observation of stars was important in determining the annual flooding of the Nile.
The Egyptian pyramids were carefully aligned towards the pole star,[citation needed] and the temple of Amun-Re at Karnak was aligned on the rising of the midwinter Sun.[citation needed] Astronomy played a considerable part in fixing the dates of religious festivals and determining the hours of night, and temple astrologers were especially adept at watching the stars and observing the conjunctions and risings of the Sun, Moon, and planets, as well as the lunar phases.
In Ptolemaic Egypt, the Egyptian tradition merged with Greek astronomy and Babylonian astronomy, with the city of Alexandria in Lower Egypt becoming the centre of scientific activity across the Hellenistic world. Roman Egypt produced the greatest astronomer of the era, Ptolemy (90–168 CE). His works on astronomy, including the Almagest, became the most influential books in the history of Western astronomy. Following the Muslim conquest of Egypt, the region came to be dominated by Arabic culture and Islamic astronomy.
The astronomer Ibn Yunus (c. 950–1009) observed the Sun's position for many years using a large astrolabe, and his observations on eclipses were still used centuries later. In 1006, Ali ibn Ridwan observed the SN 1006, a supernova regarded as the brightest stellar event in recorded history, and left the most detailed description of it. In the 14th century, Najm al-Din al-Misri wrote a treatise describing over 100 different types of scientific and astronomical instruments, many of which he invented himself.