Muhammad's qibla in Medina. Early Islamic astronomy was built on its Indian and Greek counterparts, especially the works of Ptolemy, and soon Muslim astronomers developed methods to calculate the approximate directions of the qibla, starting from the mid-9th century. In the late 9th and 10th centuries, Muslim astronomers developed methods to find the exact direction of the qibla which are equivalent to the modern formula. Initially, this "qibla of the astronomers" was used alongside various traditionally determined qiblas, resulting in much diversity in medieval Muslim cities. In addition, the accurate geographic data necessary for the astronomical methods to yield an accurate result was not available before the 18th and 19th centuries, resulting in further diversity of the qibla. Historical mosques with differing qiblas still stand today throughout the Islamic world. The spaceflight of a devout Muslim, Sheikh Muszaphar Shukor, to the International Space Station (ISS) in 2007 generated a discussion with regard to the qibla direction from low Earth orbit, prompting the Islamic authority of his home country, Malaysia, to recommend determining the qibla "based on what is possible" for the astronaut. Location The qibla is the direction of the Kaaba, a cube-like building at the centre of the Sacred Mosque (al-Masjid al-Haram) in Mecca, in the Hejaz region of Saudi Arabia. Other than its role as qibla, it is also the holiest site for Muslims, also known as the House of God (Bait Allah) and where the (the circumambulation ritual) is performed during the Hajj and umrah pilgrimages. The Kaaba has an approximately rectangular ground plan with its four corners pointing close to the four cardinal directions. According to the Quran, it was built by Abraham and Ishmael, both of whom are prophets in Islam. Few historical records remain detailing the history of the Kaaba before the rise of Islam, but in the generations prior to Muhammad, the Kaaba had been used as a shrine of the pre-Islamic Arabic religion. The qibla status of the Kaaba (or the Sacred Mosque in which it is located) is based on the verses 144, 149, and 150 of the al-Baqarah chapter of the Quran, each of which contains a command to "turn your face toward the Sacred Mosque" (fawalli wajhaka shatr al-Masjid il-Haram). According to Islamic traditions, these verses were revealed in the month of Rajab or Shaban in the second Hijri year (623 CE), or about 15 or 16 months after