Al-Isra 17:1 tells how the Prophet was taken by night from al-Masjid al-Haram "to al-Masjid al-Aqsa, whose surroundings We have blessed". "Aqsa" means "farthest". The great majority of commentators identify al-Masjid al-Aqsa with Bayt al-Maqdis in Jerusalem.
When the verse was revealed, the present mosque buildings had not yet been built, so the expression refers to the sacred precinct in which the mosque stands (al-Haram al-Sharif). Jerusalem served as the qibla of the Muslims for about sixteen or seventeen months after the Hijra.
Today the precinct contains the Qibli Mosque (al-Jami' al-Aqsa) and the Dome of the Rock. Together with al-Masjid al-Haram in Mecca and the Prophet's Mosque in Medina, it is regarded as one of the three holiest mosques in Islam.