The Aqsa Mosque is the third largest holy temple in Islam. It is second only to the holy temple of Mecca and the prophet temple of Medina. It is located in the southwest corner of the Sharif inner courtyard in the eastern part of the Old City of Jerusalem. The Arabic word "Aqsa" means "far away", so it is also called "far temple". The name derives from the legend of the prophet Muhammad of Islam, who accompanied him from Mecca on a night tour of the seven heavens by angel Gibliel on a night tour of Jerusalem. The Al-Aqsa Mosque is the "far temple" in chapter 17 of the Koran. It is the place where the Musain Dengyu led the worship of saints from Adam to Ilsa (Jesus) in 621, and is one of the three holiest places in Islam. It is said to have been built by the ancient prophet Suleiman and rebuilt during the caliphate Omar period.