Traditional methods Historical records and surviving old mosques show that throughout history the qibla was often determined by simple methods based on tradition or "folk science" not based on mathematical astronomy. Some early Muslims used due south everywhere as the qibla, literally following Muhammad's instruction to face south while he was in Medina (Mecca is due south of Medina). Some mosques as far away as al-Andalus to the west and Central Asia to the east face south, even though Mecca is nowhere near that direction. In various places, there are also the "qiblas of the companions" (qiblat al-sahaba), those which were used there by the Companions of the Prophet—the first generation of Muslims, who are considered role models in Islam. Such directions were used by some Muslims in the following centuries, side by side with other directions, even after Muslim astronomers used calculations to find more accurate directions to Mecca. Among the directions described as the qiblas of the companions are due south in Syria and Palestine, the direction of the winter sunrise in Egypt, and the direction of the winter sunset in Iraq. The direction of the winter sunrise and sunset are also traditionally favoured because they are parallel to the walls of the Kaaba. Development of methods Pre-astronomy The determination of qibla has been an important problem for Muslim communities throughout history. Muslims are required to know the qibla to perform their daily prayers, and it is also needed to determine the orientation of mosques. When Muhammad lived among the Muslims in Medina (which, like Mecca, is also in the Hejaz region), he prayed due south, according to the known direction of Mecca. Within the few generations after Muhammad's death in 632, Muslims had reached places far away from Mecca, presenting the problem of determining the qibla in new locations. Mathematical methods based on astronomy would develop only at the end of the 8th century or the beginning of the 9th, and even then they were not initially popular. Therefore, early Muslims relied on non-astronomical methods. There was a wide range of traditional methods in determining the qibla during the early Islamic period, resulting in different directions even from the same place. In addition to due south and the qiblas of the companions, the Arabs also knew a form of "folk" astronomy—called so by the historian of astronomy David A. King to distinguish it from conventional astronomy, which