The Quba Mosque (Quba’ Masjid or Masjid al-Quba, Arabic: مسجد قباء), in the outlying environs of Medina in Saudi Arabia, is the oldest mosque in the world. Its first stones were positioned by the Islamic prophet Muhammad as soon as he arrived on his emigration from the city of Mecca to Medina and the mosque was completed by his companions. Muhammad spent more than 20 nights in this mosque (after migrating) praying qasr (a short prayer) while waiting for Ali whose house was behind this mosque.
According to Islamic tradition, offering two rakaʿāt of nafl prayers in the Quba Mosque is equal to performing one Umrah.
Muhammad used to go there, riding or on foot, every Saturday and offer a two rak’ah prayer. He advised others to do the same, saying, “Whoever makes ablutions at home and then goes and prays in the Mosque of Quba, he will have a reward like that of an ‘Umrah.” This hadith is reported by Ahmad ibn Hanbal, Al-Nasa’i, Ibn Majah and Hakim al-Nishaburi.