Qibla.
The qibla is the direction towards the Kaaba in the Sacred Mosque, Mecca, Saudi Arabia, which is used by Muslims in various religious contexts, including ritual prayer. Muslims believe the Kaaba to be a sacred site built by the prophets Abraham and Ishmael, and that its use was ordained by God in several verses of the Quran revealed in the second Hijri year. Prior to this revelation, Muhammad and his followers in Medina faced Jerusalem for prayers. Most mosques contain a mihrab or a wall niche that indicates the direction of the qibla. Before the development of astronomy in the Islamic world, Muslims used traditional methods to determine the qibla. These methods included facing the direction that the companions of Muhammad had used when in the same place or using the setting and rising points of celestial objects. In the late 9th and 10th centuries, Muslim astronomers developed methods to find the exact direction of the qibla, and today it can be calculated using a trigonometric formula.